Looking at the 3rd edition of the orange book and the GLSL language specification, it would appear that variables such as gl_ModelViewMatrix have been depreciated in favor of uniform variables. For example, in the orange book, I see the modelview matrix represented as follows
uniform mat4 MVMatrix;
in the shader source code listing (p 189), but there is no call to glUniform in the application code (p 247) that indicates what maps this variable name to the corresponding OpenGL state. If this isn’t a typo in the book, I assume that “MVMatrix” is a reserved name, but I can’t find any documentation indicating what all these variables are.
These “gl_” variables seemed like a really convenient way to reference the underlying OpenGL state. Does anyone know why this change was made? Can anyone point me to any documentation indicating what the preferred way to do this is?