Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML clashing with GLee  (Read 7904 times)

0 Members and 1 Guest are viewing this topic.

Rotaerk

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML clashing with GLee
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML clashing with GLee
« Reply #1 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.
Laurent Gomila - SFML developer

Rotaerk

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML clashing with GLee
« Reply #2 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML clashing with GLee
« Reply #3 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.
Laurent Gomila - SFML developer

Rotaerk

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML clashing with GLee
« Reply #4 on: November 22, 2007, 03:32:13 am »
Sounds good to me :)