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:
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.
9 thoughts on “GLEW Does Not Work with an OpenGL 3 or 4 Core Profile”
Should be easy to fix.
GL_EXTENSION appears to only be used in this file:
They just have to add smarts to glewGetExtension
Use biggle 😀
This bug was reported a long time ago – way back in January
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
Comments are closed.