[Solved] Building CEGUI 0.8.7 with OpenGLES

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

ishara
Just popping in
Just popping in
Posts: 3
Joined: Tue Jul 12, 2016 15:39

[Solved] Building CEGUI 0.8.7 with OpenGLES

Postby ishara » Tue Jul 12, 2016 16:13

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.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Tue Jul 12, 2016 17:11

@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".

ishara
Just popping in
Just popping in
Posts: 3
Joined: Tue Jul 12, 2016 15:39

Re: Building CEGUI 0.8.7 with OpenGLES

Postby ishara » Wed Jul 13, 2016 01:45

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.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Wed Jul 13, 2016 02:17

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.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Wed Jul 13, 2016 02:26

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.

ishara
Just popping in
Just popping in
Posts: 3
Joined: Tue Jul 12, 2016 15:39

Re: Building CEGUI 0.8.7 with OpenGLES

Postby ishara » Fri Jul 15, 2016 05:27

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...

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Fri Jul 15, 2016 08:44

@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?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Building CEGUI 0.8.7 with OpenGLES

Postby Ident » Sun Jul 17, 2016 20:48

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.
CrazyEddie: "I don't like GUIs"

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Sun Jul 17, 2016 21:03

Oh, for some reason I had gotten the impression he wants to use OpenGL ES..

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Sun Jul 17, 2016 21:06

@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?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Postby Ident » Thu Jul 28, 2016 21:40

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.
CrazyEddie: "I don't like GUIs"

krishan121
Just popping in
Just popping in
Posts: 5
Joined: Thu Aug 18, 2016 08:59

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Postby krishan121 » Thu Oct 13, 2016 13:27

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

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Thu Oct 13, 2016 15:47

@krishan121: What platform? What does "OpenGLInfo::getSingleton().type()" return to u if u call it just b4 the exception is thrown?

krishan121
Just popping in
Just popping in
Posts: 5
Joined: Thu Aug 18, 2016 08:59

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Postby krishan121 » Mon Oct 17, 2016 07:01

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);

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] Building CEGUI 0.8.7 with OpenGLES

Postby YaronCT » Mon Oct 17, 2016 08:25

@krishan121: I'm glad it has worked out. In the future, plz open a new thread if u have a new issue.


Return to “Help”

Who is online

Users browsing this forum: Baidu [Spider] and 27 guests