PDA

View Full Version : 10,000 gl_ a line...



Julien Cayzac
02-26-2002, 10:36 AM
Why are all the shading language's built-in variables/constants beginning with "gl_" ?
Won't OpenGL 2.0 shaders be meant to be used by OpenGL 2.0 API only ?
I suggest defining new types such as OPENGL20SHADERVARYINGVEC3F, OPENGL20SHADERVARYINGMAT4F, and so on http://www.opengl.org/discussion_boards/ubb/smile.gif

Julien.

zom
03-05-2002, 07:55 AM
To protect our shaders against future D3D releases eating gl sources?

Ciao,
zom.

MikeC
03-05-2002, 10:33 AM
At a guess, it's the usual reason for namespace prefixes. It allows the ARB to introduce new builtins later without having to worry about breaking existing shaders. Unless the shader writers called their variables gl_foo, of course, in which case they deserve to be broken.