#200 glGetPointerv of GL_KHR_debug hides OpenGL 1.1

Nigel Stewart

glew-1.9.0 initializes glGetPointerv only of the GL_KHR_debug extension is present, otherwise it remains null - even though the NVidia opengl impl exports the symbol.
However, glGetPointerv should alsways be present as it's part of the OpenGL 1.1 API.

My builds of Warzone 2100 now crash during startup because it now links to libGLEW::__glewGetPointerv instead of LibGL::glGetPointerv, hence calls null.

If I read the GL_KHR_debug correctly, it tries to say that additional tokens are now accepted by the <pname> parameter of GetPointerv( DEBUG_CALLBACK_FUNCTION and DEBUG_CALLBACK_USER_PARAM) and rather not that the method itself is new.


  • Nigel Stewart
    Nigel Stewart

    Thanks for the report. I'd like to put a GLEW 1.9.1 together, soon.

  • Nigel Stewart
    Nigel Stewart

    • status: open --> accepted
    • assigned_to: Nigel Stewart
    • milestone: --> 1.9.1

  • Anonymous

    Note that it would be good to add glGetPointervEXT of the GL_EXT_vertex_array extension for compatibility with code depending on GL_EXT_vertex_array.

  • While we wait for 1.9.1, the easy and quick solution is to edit the glew.h header and comment out the following line:

    define glGetPointerv GLEW_GET_FUN(__glewGetPointerv)

    as in:

    //rem #define glGetPointerv GLEW_GET_FUN(__glewGetPointerv)

    and rebuilf the project. This worked fine for me when building the 002_triangle_compatibility project in OGLplus 0.31.0

  • I need to correct myself. It turned out that I was using the wrong glew library for my nuild. There is no need to remove the glGetPointerv as I did in my previous comment.



Cancel   Add attachments