I just received the information about a bug in GLEW that prevents to use it with an OpenGL core profile (OpenGL 3 or OpenGL 4). The bug comes from the fact that the function:
glGetString(GL_EXTENSIONS)
is used in glewGetExtension() which is often called in GLEW initialization.
Why glGetString(GL_EXTENSIONS) is a problem?
Simply because in a core profile, GL_EXTENSIONS is DEPRECATED. In the OpenGL 3 or 4 specifications (see the GL4 specs HERE) you can find in the deprecated and removed features section:
- Unified extension string – EXTENSIONS target to GetString.
glGetString(GL_EXTENSIONS) being deprecated, an error is generated, no extension is returned and then GLEW fails to initialize.
So currently, it’s not recommended to use GLEW with a core profile context.
Source: AMD
Should be easy to fix.
GL_EXTENSION appears to only be used in this file:
http://glew.svn.sourceforge.net/viewvc/glew/trunk/glew/auto/src/glew_init_gl.c?revision=612&view=markup
They just have to add smarts to glewGetExtension
Use biggle 😀
This bug was reported a long time ago – way back in January
http://sourceforge.net/tracker/?func=detail&aid=2960200&group_id=67586&atid=523274
http://sourceforge.net/tracker/?func=detail&aid=2927731&group_id=67586&atid=523274
Surprised it is not fixed yet.
Yep it’s an old bug…
Pingback: [TIPS] How To Get the List of the OpenGL Extensions With a Core Profile - 3D Tech News, Pixel Hacking, Data Visualization and 3D Programming - Geeks3D.com
Hey, how come it works for me ? even though i have set the context for opengl 3.0 !
certainly because you use a compatibility profile and not a core profile.
Pingback: [OpenGL] GLEW 1.5.6 Released - 3D Tech News, Pixel Hacking, Data Visualization and 3D Programming - Geeks3D.com
glewExperimental = GL_TRUE