SFML community forums

Help => Window => Topic started by: Rotaerk on November 21, 2007, 04:48:43 am

Title: SFML clashing with GLee
Post by: Rotaerk on November 21, 2007, 04:48:43 am
The GLee library's main header, <gl/glee.h>, may not be included after <gl/gl.h>.  Also, the former includes the latter.

Now in version 1.1 of SFML, the <sfml/window.hpp> header includes <sfml/window/openglcaps.hpp>, which in turn includes <sfml/window/glew/glew.h>.  This header also cannot be included after <gl/gl.h>, and includes <gl/gl.h> internally.

This is an issue because no matter the order in which you include <gl/glee.h> and <sfml/window.hpp>, a compiler error occurs.

Considering GLee is a library meant to serve as a sort of wrapper for GL, it makes sense that it would have such a requirement.  However, SFML windows shouldn't.  I hope this issue is resolved.  For now I will continue to use SFML 1.0 until it is.  If it does not get fixed I will have to find another library.
Title: SFML clashing with GLee
Post by: Laurent on November 21, 2007, 05:28:10 am
You can just remove the include of glew.h from SFML headers, if you don't need it.
Title: SFML clashing with GLee
Post by: Rotaerk on November 21, 2007, 07:39:15 pm
Okay, I could do that.  However, if it is safe to simply remove that include from the header, then it is an unnecessary dependency.  Furthermore it causes issues with other libraries.  So should it really be there in the released version?  I would like to not have to make modifications to a third-party library every time I set it up.
Title: SFML clashing with GLee
Post by: Laurent on November 22, 2007, 02:17:32 am
I'll probably add a SFML_USEGLEW macro to control the inclusion of GLEW header. So by default it won't be included, but still available for people who want to use it.
Title: SFML clashing with GLee
Post by: Rotaerk on November 22, 2007, 03:32:13 am
Sounds good to me :)