g-truc/ogl-samples

Calling glGetString(GL_EXTENSIONS) from a core profile

timothyja opened this issue · 5 comments

glGetString(GL_EXTENSIONS) shouldn't be called from a core profile.

This is at least called when running ./build/Release/gl-320-primitive-sprite possibly elsewhere too.

See Mesa bug: https://bugs.freedesktop.org/show_bug.cgi?id=77582

Updated info in the Mesa bug.
ogl-samples should not use GLEW given it doesn't support core profile (yet).

This is why the samples call glGetError right after glewInit.

It has been enough for the moment and I hope it will be enough for Mesa too.

I don't mind to update glew.c to use glGetStringi as it should do if that's necessary.

Thanks,
Christophe

This is why the samples call glGetError right after glewInit.

There is no error checking of glGetError(). What is the purpose?
Ditto for glewInit() and glfwInit().

Anyway, I performed more tests and the fail comes previous that, from glfwCreateWindow() which returns NULL. I don't understand why.

Ok that was my fault.
I had an old libGL in /usr/local/lib64 directory! è_é
Now ogl-samples works.

That said, is there a way to submit patchs to ogl-samples?

Sure, just submit a pull request with GitHub.

Thanks,
Christophe