Right now GLEW on OpenGL 3+ core profile is totally broken, as it still uses glGetString for extensions; this patch fixes that by constructing a simple open adressing hashset with all of the extensions from glGetStringi and uses that hashset for any further lookups.
Deferring, for now.
Any update on this issue? In SuperTuxKart we apparently just had the same problem, and need to include a patched version of glew, which doesn't make linux package maintainers happy.
I have a reworked version of this patch that supports GLEW_MX and tested on Win+Mac+Linux. However, the issue exists is that in a core context only extensions not in CORE are provided.. Thus things like ARB_vertex_array_object are not in the extension list as they are CORE in OGL 3.0+.. So GLEW doesn't load those functions at all. So, even with this patch you still need to specify glewExperimental = GL_TRUE;
To get those functions loading there are a few options.. All of which require parsing the registry/xml/gl.xml to note what functions and extensions are in glcore.
1) "stuff" the extension hash with the other extensions
2) simply add those extra functions into the GL_VERSION init method.
3) adjust the calling of the ext load functions so that they also check if the GL_VERSION_X_X is specified.
I've reworked it so core extensions are now properly loaded. it's a mix of 2 & 3. All my changes based on master are here.
https://sourceforge.net/u/urkle/glew/ci/core-gl-context/tree/
Comments are welcome.. I'll be using these changes in an upcoming mac+linux port I'm working on.
See also:
https://github.com/nigels-com/glew/pull/24
I moved my branch (and rebased it) over to github.. https://github.com/urkle/glew/compare/core-gl-context
Fixed in the upcoming GLEW 2.0.0 release. Closing this.
Thanks for the report.