misc changes from testing
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 30 May 2003 15:38:26 +0000 (15:38 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 30 May 2003 15:38:26 +0000 (15:38 +0000)
progs/tests/vparray.c

index d7d2db2bdbd0db1dbecdbc2e217658e1708bfe11..65a3bbfefc3754587b6a0ddb8e798e172d7a3819 100644 (file)
@@ -69,13 +69,21 @@ static void Display(void)
          if (useProgram) {
             glVertexAttribPointerNV( 0, 3, GL_FLOAT, 6 * sizeof(GLfloat), data );
             glEnableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV );
+            glVertexAttribPointerNV( 2, 3, GL_FLOAT, 6 * sizeof(GLfloat), ((GLfloat *) data) + 3);
+            glEnableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV);
+
+            glDisableClientState( GL_VERTEX_ARRAY );
+            glDisableClientState( GL_NORMAL_ARRAY );
          }
          else {
             glVertexPointer( 3, GL_FLOAT, 6 * sizeof(GLfloat), data );
             glEnableClientState( GL_VERTEX_ARRAY );
+            glNormalPointer( GL_FLOAT, 6 * sizeof(GLfloat), ((GLfloat *) data) + 3);
+            glEnableClientState( GL_NORMAL_ARRAY );
+
+            glDisableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV );
+            glDisableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV);
          }
-         glNormalPointer( GL_FLOAT, 6 * sizeof(GLfloat), ((GLfloat *) data) + 3);
-         glEnableClientState( GL_NORMAL_ARRAY );
 
          glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts);