First, gl_Position
is the output position from the vertex shader, not the input. It's not a vertex attribute and it never has been. You're probably thinking about gl_Vertex
.
Most importantly second, the built-in attributes like gl_Vertex
, gl_Color
, etc do not have generic attribute indices. gl_Vertex
is not the same thing as generic attribute 0. The OpenGL specification explicitly forbids these two being the same. Generic attributes (things that have attribute indices) and built-in attributes do not "alias" with one another. They don't share the same resources or space.
Now, NVIDIA's OpenGL implementation allows aliasing, in direction contravention of the OpenGL specification. But such code is non-portable (and terrible). If you want to find exactly how NVIDIA does their mapping, I'm sure documentation on NVIDIA's site will spell it out somewhere.