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





[ Subscribe to Geeks3D latest news by email ]

Geeks3D.com

↑ Grab this Headline Animator