Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: gl_TexCoord[] indexing

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    570

    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?

  2. #2
    Intern Newbie
    Join Date
    Apr 2004
    Posts
    45

    Re: gl_TexCoord[] indexing

    in my ooptnion you can't do it the way like this .. the index must be a const value .. i tried something like this ..

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •