static GLfloat yrot;
static GLboolean useArrays = GL_TRUE;
static GLboolean useProgram = GL_TRUE;
+static GLboolean useList = GL_FALSE;
static void read_surface( char *filename )
glEnableClientState( GL_NORMAL_ARRAY );
}
- glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts);
+ if (useList) {
+ /* dumb, but a good test */
+ glNewList(1,GL_COMPILE);
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts);
+ glEndList();
+ glCallList(1);
+ }
+ else {
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, numverts);
+ }
glDisableClientState( GL_VERTEX_ATTRIB_ARRAY0_NV );
glDisableClientState( GL_VERTEX_ATTRIB_ARRAY2_NV);
useArrays = !useArrays;
printf("use arrays: %s\n", useArrays ? "yes" : "no");
break;
+ case 'l':
+ useList = !useList;
+ printf("use list: %s\n", useList ? "yes" : "no");
+ break;
case 'p':
useProgram = !useProgram;
printf("use program: %s\n", useProgram ? "yes" : "no");