Page 1 of 1

[NoBug] Disable init of glew

Posted: Mon Jun 30, 2014 03:32
by Alundra
Hi,
I'm new in CEGUI so maybe this feature already exist.
I have a 3D renderer who already init OpenGL extensions but I saw CEGUI renderer does using GLEW.
Is it possible to disable this init of glew without changing the renderer code ?
If it's not possible, it could be nice to allow to disable using a macro.
Thanks

Re: Disable init of glew

Posted: Mon Jun 30, 2014 08:43
by Ident
CEGUI doesn't care how you create your OpenGL context. It shouldn't be a problem at all. Did you even try it out?

Re: Disable init of glew

Posted: Mon Jun 30, 2014 13:57
by Alundra
Using the opengl renderer of CEGUI I have to add the glew lib in my project but I don't use glew to avoid to add this lib, I have a generated .h/.cpp.
I'm not happy to have to add this lib ... Do I must change the OpenGL renderer or write mine for my 3D engine ?
I use : https://bitbucket.org/alfonse/glloadgen/wiki/Home

Re: Disable init of glew

Posted: Mon Jun 30, 2014 14:33
by Kulik
CEGUI uses glew, you should not need to add glew to your project because CEGUI links to glew.

Feel free to rewrite the OGL renderer to use whatever you like but don't expect help from us.

Frankly I have no idea what this is about because the impact on your code is roughly 0. Just use it as it is and be happy about it. glew doesn't prevent your OGL extension loader from working. The whole thing seems like an acute case of OCD :-)

Re: Disable init of glew

Posted: Mon Jun 30, 2014 16:34
by Ident
You do not need to include the headers INTO your own code, you do not need to do anything with glew. Since it does not affect your own code, your includes, and your general project at all, and since you can use the library you linked without having to care about glew, can you point out what exactly the issue is? do you have linker issues? redefines? anything?
As far as I see you are just complaining about having to link to glew for no reason (or maybe a religious or spirutual one) becaue you havent shown us how or in what way the fact that CEGUi uses glew is limiting you. How is it?

Re: Disable init of glew

Posted: Mon Jun 30, 2014 16:45
by Alundra
Yes it's just because of link an additional external lib, but if no way exist to avoid that I will do with.

Re: Disable init of glew

Posted: Mon Jun 30, 2014 17:13
by Kulik
We use functionality of glew in the OGL renderer. What do you suggest we should do? We could avoid the dependency if we queried our extensions by hand but frankly that's very expensive to maintain. If you are willing to write the code to avoid the glew dependency I think we would consider it.

Re: Disable init of glew

Posted: Mon Jun 30, 2014 17:17
by Ident
Kulik wrote: If you are willing to write the code to avoid the glew dependency I think we would consider it.

And who would maintain that code in the future?

Asking us to not depend on external libraries seems like a strange idea to me. We won't reinvent the wheel when the functionality is already provided in well established and fully functional libraries.