static GLfloat xrot;
static GLfloat yrot;
-static GLboolean useArrays = GL_FALSE;
-static GLboolean useProgram = GL_FALSE;
+static GLboolean useArrays = GL_TRUE;
+static GLboolean useProgram = GL_TRUE;
static void read_surface( char *filename )
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);
}
glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts);
glDisableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV );
+ glDisableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV);
glDisableClientState( GL_VERTEX_ARRAY );
glDisableClientState( GL_NORMAL_ARRAY );
}