Accessing built-in vars from glGetUniformLocation

With the onset of 3.1, where many API calls will be deprecated, it seems logical that the client side should have access to built in variables (e.g. gl_ModelViewProjectionMatrix) via glGetUniformLocation(). My experiments so far return -1 if I call glGetUniformLocation( “gl_ModelViewProjectionMatrix” ), even if the shader is using that variable. Does anyone have an idea if I’m barking up the wrong tree or if there is another way to do this?

glGetUniformLocation specifically disallows querying built-ins. These must be set and queried via the other API interfaces. When the API interfaces are removed, the built-ins will also be removed. They’re marked as deprecated in the GLSL 1.30 spec.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.