[OSX] using VAO in core profile with Qt

Hello,

I use an OpenGL surface in opengl 3.2 core profile with Qt 5.6.
When I call glGenVertexArray(1, &vao); I have the error: GL_INVALID_OPERATION 0x0502
This is happen only on mac (10.10.2).

Best regards,
Robin

That might happen if you are using a library that sets up GL function pointers for you, like GLEW, and it incorrectly uses glGenVertexArraysAPPLE() instead of GenVertexArrays().

Set breakpoints on both functions, and see which one you actually hit in libGL.dylib.

Thank you!
you are right. The lidGL.dylib loaded ins’t the good one.