If a pure OpenGL 3.2 context is created, the extension check as it stands will simply generate a long list of invalid enum errors.
As discussed here:
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=245775
I propose similar code to the mentioned in that thread be added to glewGetExtension if OpenGL 3.0 or greater is supported:
(please test - as I have just typed this without even a compile)
GLboolean glewGetExtension (const char name)
{
GLuint len = _glewStrLen((const GLubyte)name);
/ OpenGL 3.0 has a new extension mechanism /
if(GLEW_VERSION_3_0)
{
GLint n = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &n);
for (GLint i = 0; i < n; i++)
{
if(_glewStrSame((const GLubyte)name, glGetStringi(GL_EXTENSIONS, i), len))
{
return TRUE;
}
}
}
else
{
GLubyte p;
GLubyte end;
p = (GLubyte)glGetString(GL_EXTENSIONS);
if (0 == p) return GL_FALSE;
end = p + _glewStrLen(p);
while (p < end)
{
GLuint n = _glewStrCLen(p, ' ');
if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE;
p += n+1;
}
}
return GL_FALSE;
}
Thanks for the report.
Seems to be a duplicate of 2927731.
The additional info is still welcome.
Fixed in the upcoming GLEW 2.0.0. A preview snapshot is available: https://github.com/nigels-com/glew#recent-snapshots Closing.