1 Reply Latest reply on Oct 18, 2010 4:36 AM by frali

    gl_InstanceID attribute location is not -1 when queried.

    nesister

      Hi,

      the OpenGL 3.3 doc for glGetAttribLocation states that "if name starts with the reserved prefix "gl_", a value of -1 is returned.". This fails with latest catalyst 10.9, at least with 'gl_InstanceID'.

      This simple program, when successfuly compiled and linked reports gl_InstanceID attribute at location 0, and 'position' at location 1.

       

      vertex shader:

       

      #version 330

      in vec3 position;

      uniform mat4x4 modelview[2];

      void main() {

          gl_Position = modelview[gl_InstanceID] * vec4(position, 1);

      }



       

      fragment shader:

       

      #version 330

      void main() {

          gl_FragColor = vec4(1, 0, 0, 1);

      }



      This is basically the same issue as here : http://forums.amd.com/devforum/messageview.cfm?catid=392&threadid=139288&enterthread=y