GLEW Does Not Work with an OpenGL 3 or 4 Core Profile



OpenGL

GLEW



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



9 thoughts on “GLEW Does Not Work with an OpenGL 3 or 4 Core Profile”

  1. 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

  2. Friktion

    Hey, how come it works for me ? even though i have set the context for opengl 3.0 !

  3. Pingback: [OpenGL] GLEW 1.5.6 Released - 3D Tech News, Pixel Hacking, Data Visualization and 3D Programming - Geeks3D.com

Comments are closed.