Page 1 of 2

[Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Tue Jul 12, 2016 16:13
by ishara
Does anyone knows how to build CEGUI 0.8.7 with OpenGLES for ARM devices on linux(Debian -- “jessie”) . During the configuration process it shows following message.

Code: Select all

-- Could NOT find OPENGLES (missing:  OPENGLES_LIB OPENGLES_H_PATH)


And how can I find below two includes because installing "libgles2-mesa-dev" or "libgles1-mesa-dev" will not provide includes under the folder name "GLES".(Available include folders are GL,GLES2,GLES3)

Code: Select all

#   include <GLES/gl.h>
#   include <GLES/glext.h>

which are in "GLES.h" (cegui/include/CEGUI/RendererModules/OpenGLES)

Any help is welcome.

Re: Building CEGUI 0.8.7 with OpenGLES

Posted: Tue Jul 12, 2016 17:11
by YaronCT
@ishara: Are u trying to use cegui on Android?

The packages "libgles2-mesa-dev" and "libgles1-mesa-dev" r for using OpenGL ES on your build platform (Debian), not on your host platform (Android?). The OpenGL ES headers are part of the Android NDK.

Anyway, to build cegui with OpenGL ES (>= 2) support, you don't need the OpenGL ES headers at all. U do need, however, to use Epoxy (get it here, use branch "master" - not a release) rather than GLEW, as an OpenGL loading library. To do that, configure cegui with "-DCEGUI_USE_EPOXY=ON -DCEGUI_USE_GLEW=OFF".

Re: Building CEGUI 0.8.7 with OpenGLES

Posted: Wed Jul 13, 2016 01:45
by ishara
My intention is to run some UI components on SDL2 with CEGUI on BeagleBone Black board which is running Debian -- “jessie”.

I built CEGUI on BeagleBone Black (not cross-compiling) with relevant dependencies (via installing apt-get install libepoxy-dev ect... not manually building from source) .

Then the issue comes up with building CEGUI. As you mentioned I added DCEGUI_USE_EPOXY=ON and -DCEGUI_USE_GLEW=OFF via cmake-gui. But it didn't create a libCEGUIOpenGLESRenderer-0.so in the build location.

Therefore I'm not able to create a renderer as

Code: Select all

CEGUI::OpenGLESRenderer::bootstrapSystem();


Thanks for the quick reply.

Re: Building CEGUI 0.8.7 with OpenGLES

Posted: Wed Jul 13, 2016 02:17
by YaronCT
Oh, I see..

Yes, this is indeed confusing. You don't need the "CEGUIOpenGLESRenderer" - I think it's an old unfinished work that was supposed to support only OpenGL ES 1. However, "CEGUIOpenGLRenderer" supports both desktop OpenGL 3.2 and OpenGL ES 2 - that's the renderer u should use. It automatically identifies whether it's desktop OpenGL or OpenGL ES.

Re: Building CEGUI 0.8.7 with OpenGLES

Posted: Wed Jul 13, 2016 02:26
by YaronCT
Note: The official Epoxy is currently no longer maintained. I recommend u to use my fork that I linked to above, which contains fixes and improvements. Otherwise it may limit my ability to help u in case of a problem.

Re: Building CEGUI 0.8.7 with OpenGLES

Posted: Fri Jul 15, 2016 05:27
by ishara
I managed to solve the issue with your instructions.... I used

Code: Select all

CEGUI::OpenGLRenderer::bootstrapSystem();
and

Code: Select all

#include <GL/gl.h>
#include <GL/glu.h>
worked for me instead of epoxy.

Code: Select all

CEGUI::OpenGL3Renderer::bootstrapSystem();
didn't worked for me because GLSL version 1.5 is not supported.

Thanks for the great help provided...

Re: Building CEGUI 0.8.7 with OpenGLES

Posted: Fri Jul 15, 2016 08:44
by YaronCT
@ishara: What's GLSL 1.5? here I c GLSL 1.0 and 3.0, not 1.5. What version of OpenGL ES do u use?

Re: Building CEGUI 0.8.7 with OpenGLES

Posted: Sun Jul 17, 2016 20:48
by Ident
There is a glsl "version #150", which is the version corresponding to OpenGL 3.2. This OpenGL version is the first with a core profile and therefore the one used for the OpenGL 3.2+ Core Profile renderer. I don't think there is an #150 shader version for OpenGL ES though.

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Sun Jul 17, 2016 21:03
by YaronCT
Oh, for some reason I had gotten the impression he wants to use OpenGL ES..

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Sun Jul 17, 2016 21:06
by YaronCT
@ishara: "CEGUI::OpenGLRenderer" supports only desktop OpenGL (1.2), not OpenGL ES. Does that fit your needs? And if so, y at all were u looking at OpenGL ES and Epoxy?

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Thu Jul 28, 2016 21:40
by Ident
My point was that if wanting OpenGL ES then #150 is not a thing there. OpenGL 3 core profile is very close to OpenGL ES 2.X, but OpenGLRenderer (which is more like OpenGL 2.X) is closer to OpenGL ES 1.X. If he wants to use OpenGL ES 2.X (most likely) than adapting OpenGL 3 Core profile is the way to go. Otherwise the OpenGLRenderer is closest but I can't help with that.

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Thu Oct 13, 2016 13:27
by krishan121
I'm using you'r fork of epoxy (https://github.com/yaronct/libepoxy) to build cegui 0.8.7.
I'm using OpenGL3Renderer with my application.

Code: Select all

::CEGUI::OpenGL3Renderer::bootstrapSystem()


when i'm running my application, I'm getting a CEGUI::RendererException

the error message i'm getting is,

CEGUI::RendererException in function 'void CEGUI::OpenGL3Shader::outputShaderLog(GLuint)' (/home/ubuntu/Desktop/shared_location/Software/cegui-0.8.7/cegui/src/RendererModules/OpenGL/Shader.cpp:244) : OpenGL3Shader compilation has failed.
(1:0) : error : Expect 100 afer the #version.
(1:0) : error : Error in parsing.
error : syntax error

terminate called after throwing an instance of 'CEGUI::RendererException'
what(): CEGUI::RendererException in function 'void CEGUI::OpenGL3Shader::outputShaderLog(GLuint)' (/home/ubuntu/Desktop/shared_location/Software/cegui-0.8.7/cegui/src/RendererModules/OpenGL/Shader.cpp:244) : OpenGL3Shader compilation has failed.
(1:0) : error : Expect 100 afer the #version.
(1:0) : error : Error in parsing.
error : syntax error

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Thu Oct 13, 2016 15:47
by YaronCT
@krishan121: What platform? What does "OpenGLInfo::getSingleton().type()" return to u if u call it just b4 the exception is thrown?

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Mon Oct 17, 2016 07:01
by krishan121
I solved my issue.
I'm using SDL2 in my application.
I changed my code from

Code: Select all

SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);

to

Code: Select all

SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);


and removed following code

Code: Select all

glClearColor(0.0, 0.0, 0.0, 1.0);
                    glMatrixMode(GL_PROJECTION);
                    glLoadIdentity();
                    glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 0.0);

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Posted: Mon Oct 17, 2016 08:25
by YaronCT
@krishan121: I'm glad it has worked out. In the future, plz open a new thread if u have a new issue.