PDA

View Full Version : gl_TexCoord[] indexing



Aeluned
05-17-2004, 05:51 AM
I'm trying to traverse the gl_TexCoord array (just like in the orange book pg.230) however, after compilation the infoLog returns this error:
(241) : fatal error C9999: Invalid lvalue in assignment in CreateDag

here is the relevant vertex shader code:

vec4 texVector;
for(int i=0; i < numTextures; i++)
{
//calculate texVector
...
gl_TexCoord[i] = texVector;
}

where numTextures is a uniform int.

what am I doing wrong?

andreasMank
05-17-2004, 09:34 PM
in my ooptnion you can't do it the way like this .. the index must be a const value .. i tried something like this ..


int i = 0;

gl_TexCoor[i] = ..it don't work too .. normally it should .. perhaps its not implemented yet .. who knows ..