Problem at CEGUI OPenGLES2 Renderer build

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

sh.song
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Fri Jul 17, 2015 01:35

Problem at CEGUI OPenGLES2 Renderer build

Postby sh.song » Fri Jul 17, 2015 07:17

Hi! Nice to meet you. I need your help. :|
I saw main post of CEGUi homepage;CEGUI samples running in your web browser (javascript based), download source. I'm so happy because I need just only OpenGLES2 Renderer, so I make project at vs studio for OpenGLES2 Renderer, init dependencies, and init source where CEGUI\RendererModules\OpenGLES2, and link lib.
but I got a link error.example

Code: Select all

1>StateChangeWrapper.obj : error LNK2019: unresolved external symbol __imp_glBindVertexArrayOES referenced in function "public: void __cdecl CEGUI::OpenGL3StateChangeWrapper::bindVertexArray(unsigned int)" (?bindVertexArray@OpenGL3StateChangeWrapper@CEGUI@@QEAAXI@Z)
1>D:\CEGUI\cegui-0.8.2_2\bin\CEGUIOpenGLES2Renderer-0.dll.dll : fatal error LNK1120: 1 unresolved externals

Can you give for me any answer?
Thanks for your kind, I will wait your reply :(

iceiceice
Not too shy to talk
Not too shy to talk
Posts: 33
Joined: Thu Jul 09, 2015 10:20

Re: Problem at CEGUI OPenGLES2 Renderer build

Postby iceiceice » Fri Jul 17, 2015 11:52

Hi,

I think it means that it is not able to link to one of the GLES extension functions "bindVertexArrayObject_OES" ?

There was some discussion of this in the thread in "User Projects": viewtopic.php?f=4&t=7065#p33829

Basically right now the port requires GLES2 + the vertex array object extension.

I think it's possible that you could get rid of the extension, by emulating the vertex array objects on client side, but you'd have to add some kind of structure to the CEGUI renderer that stores all the vertex data in arrays and only sends it to OpenGL when it would have bound the vertex array object.

Vertex array objects are much more efficient, and I believe that most devices in fact support them, so I was satisfied just to require the extension. I'm going to make a more clear note of that on the github page though.

I don't know how linking to GL works on windows -- maybe you need to add a second library that has the extensions? On linux I didn't have to do anything, the extension symbols were right in my GLES2 library already. Hope this helps.

~iceiceice~

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

Re: Problem at CEGUI OPenGLES2 Renderer build

Postby Ident » Fri Jul 17, 2015 15:29

Might need GLEW for those extensions
CrazyEddie: "I don't like GUIs"

iceiceice
Not too shy to talk
Not too shy to talk
Posts: 33
Joined: Thu Jul 09, 2015 10:20

Re: Problem at CEGUI OPenGLES2 Renderer build

Postby iceiceice » Sat Jul 18, 2015 15:47

sh.song:

I read a little more about this here, I think the problem is indeed that I'm not getting the extensions in the most portable way.

My opengles2 header for cegui looks like this: https://github.com/cbeck88/cegui-emscri ... ers.hpp#L4

The "GL_GLEXT_PROTOTYPES" define has an effect in the opengles2 header here (using SDL2 version of the header for reference):
https://github.com/cbeck88/cegui-emscri ... xt.h#L1182

However I guess that using the "gl_glext_prototypes" define is not the most portable way of doing it, maybe it only works on linux.

http://stackoverflow.com/questions/1752 ... n-pointers

Actually I have no idea why it works on emscripten. It's nice that it seems to work though.

To fix it I guess the simplest thing is to remove the "glext_prototypes" define and then fetch those function pointers for cegui instead, at initialization time, most likely using glew like Ident suggested.

I think SDL2 is also capable of getting these function pointers though... I am thinking to make my application use SDL2 headers only for gles2, and not to use glew. Not sure, might have an update later.

I would like my program to compile with msvc also so if you manage to get it to work I would like to hear about it :D

sh.song
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Fri Jul 17, 2015 01:35

Re: Problem at CEGUI OPenGLES2 Renderer build

Postby sh.song » Mon Jul 20, 2015 06:10

Thanks for reply!
I'll try GLEW lib, but undefined way so i confused now...
I find this link;http://3dmpengines.tistory.com/700
Good luck!

sh.song
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Fri Jul 17, 2015 01:35

Re: Problem at CEGUI OPenGLES2 Renderer build

Postby sh.song » Wed Jul 22, 2015 06:53

OpenGLES2 Renderer build success but I think, I use wrong way :(
How I do;I just remove #define GL_GLEXT_PROTOTYPES at GLES2_headers.hpp, and add code....
GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);

Anyway I make sample source using OpenGLES2 Renderer lib, and get crash at glCreateShader(in OpenGLES2 Renderer, Shader.cpp, compile()).
So search google, many people said glew initialize.
What should i do?

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

Re: Problem at CEGUI OPenGLES2 Renderer build

Postby Ident » Wed Jul 22, 2015 07:17

Initialise glew
CrazyEddie: "I don't like GUIs"

sh.song
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Fri Jul 17, 2015 01:35

Re: Problem at CEGUI OPenGLES2 Renderer build

Postby sh.song » Wed Jul 22, 2015 08:58

After remove SDL?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 27 guests