Use of undeclared identifier 'glGetUniformBlockIndex'

Hello, I’m trying to share the model-view-projection matrix metween multiple programs, and I came across a tutorial about shared uniforms on Arcsynthesis. (cannot post the link)

However, when trying to compile, I’m getting this error: “Use of undeclared identifier ‘glGetUniformBlockIndex’”.

I’m currently on Mac OSX Mountain Lion 10.8.5. OpenGL has worked very well so far, it just cannot find these functions somehow.

Is this function not supported on OSX?

On OS X, UBOs are only supported in Core Profile. You need to #include <OpenGL/gl3.h> to get the function declaration. (and re-write the rest of your application to be Core-Profile safe.)

Thank you very much, the program compiles indeed successfully when using the core profile. Now let’s see all the things I can do with these UBOs, can’t wait!