I have to send vertex attributes using glVertexAttribPointer to shaders expecting them as built-in (gl_Vertex
, gl_Color
, etc.).
The glVertexAttribPointer
function needs to specify the index (or location) of each built-in attribute. I can do it on NVidia implementations since the location of each attribute is fixed (see http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/attributes.php at the section "Custom attributes), however i'm not sure about the locations in ATI implementation.
Also, the function glGetAttribLocation
will return -1 when trying to get the location of any attribute beginning starting with "gl_".
I think i'm missing something and this is a trivial problem, however I have not found the correct solution for ATI.