#157 Multiple functions missing in forward-compatible context

2.0.0
closed
7
2016-02-06
2011-03-25
No

Just thought I'd throw this out there. Several functions that are bound when running a compatibility context (OpenGL 3.2+), such as glGenVertexArrays, are missing when running in forward-compatible mode. Calling the functions results in access to unbound memory and thus a crash.
In addition to what you are currently retrieving from the OpenGL extensions, perhaps it'd be an idea to look into what gl3w (https://github.com/skaslev/gl3w) does and parse the gl3.h header to generate the sources?

Discussion

  • Nigel Stewart

    Nigel Stewart - 2011-03-25

    Forward-compatible contexts arn't really supported by GLEW, so I'm not so sure this is a valid bug, apart from the need to support forward-compatible contexts.

     
  • Jonathan Metzgar

    try:

    glewExperimental = GL_TRUE;
    glewInit();

    and see if that works. I was having similar difficulties just recently. I traced through the glew.c source code and found that some of my functions weren't being initialized because they were flagged as "experimental."

    Also, since wglGetProcAddress(name) is the only function to get the address of an opengl function, there should be no issues with forward-compatible contexts.

     
  • Linus Mårtensson

    The issue here is that when a forward-compatible context is loaded, all (most?) OpenGL functions are unloaded, and the function pointers have to be reinitialized. GLEW, as I understand it, only initializes extension functions.
    It is perhaps wrong of me to submit this as a bug, but the general impression I otherwise have of GLEW is that after it has been initialized, I can expect any OpenGL function supported by the graphics device to work as intended, with forward-compatible contexts this is no longer true, as GLEW now only loads extensions, not the core functions that also have to be reloaded.

     
  • Nigel Stewart

    Nigel Stewart - 2011-04-03

    It's support of core contexts that seems to be the underlying issue here. So I don't think there is anything to do for this bug in particular.

     
  • Nigel Stewart

    Nigel Stewart - 2011-04-23

    Marking this bug as a duplicate. Waiting for a hero to come and deal with the core context problem, once and for all.

     
  • Nigel Stewart

    Nigel Stewart - 2015-02-19
    • assigned_to: Nigel Stewart
    • Group: --> 2.0.0
     
  • Nigel Stewart

    Nigel Stewart - 2016-02-06
    • status: open --> closed
     
  • Nigel Stewart

    Nigel Stewart - 2016-02-06

    Fixed in the upcoming GLEW 2.0.0