#208 ARB vs non ARB functions

1.10.0
closed
Nigel Stewart
None
6
2013-08-23
2012-11-09
Anonymous
No

Hi!

I don't know if this is a bug but it isn't the behavior that I would expect it while I'm coding 'comfortably' with OpenGL (I think is the goal of this library).

One of my games don't work in an Intel Atom CPU (with Intel GPU inside) because I'm trying to use glGenBuffers.

The GPU does not support OpenGL 1.5 but it supports GL_ARB_vertex_buffer_object. Then I detect VBOs support with this condition:

if(GLEW_ARB_vertex_buffer_object || GLEW_VERSION_1_5)

The problem here is that if the GPU supports OpenGL 1.5 glGenBuffers and glGenBuffersARB are not NULL, but if the GPU only supports GL_ARB_vertex_buffer_object then only glGenBuffersARB is not NULL.

What I would like/expect is that both functions had a valid value because I do not want to program strictly with OpenGL, I'm using GLEW because I want to program OpenGL comfortably.

For now I did this workaround;

if(GLEW_VERSION_1_5 == false && GLEW_ARB_vertex_buffer_object == true)
glGenBuffers = glGenBuffersARB;

But I thing you will fix this in GLEW to make easier to code in OpenGL.

By the way, thanks for your work.

Discussion

  • Nigel Stewart
    Nigel Stewart
    2012-11-11

    I think the short answer to this is that your workaround is the recommended way.

    I'd be reluctant to break with convention in GLEW that an entry point is only non-NULL if the relevant extension or GL version is available.

    And it would require new infrastructure in the GLEW source generation, or hand-coding all of these kinds of special cases, on a case-by-case basis.

    Another I have is that pre-existing codebases that depend on entry points being NULL, and suddenly take different paths in their code and perhaps not behave correctly.

    Perhaps an "easy mode" could be layered on top of GLEW, with initialization after glewInit() and used only on an opt-in basis? Or, an alternative glewInit function?

    • Nigel
     
  • Nigel Stewart
    Nigel Stewart
    2013-07-12

    • status: open --> closed
    • assigned_to: Nigel Stewart
    • Priority: 1 --> 6
     
  • Nigel Stewart
    Nigel Stewart
    2013-07-12

    Closing this.

    I still think the workaround is the appropriate solution, and could be layered on top of GLEW, optionally.

     


Anonymous


Cancel   Add attachments