gl_TexCoord[] indexing

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?

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 …

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.