/* * Measure the speed of drawing many quads from the same texture. * Based on trispd.c: * * Brian Paul February 15, 1997 This file is in the public domain. */ #include #include #include #include #include static float MinPeriod = 2.0; /* 2 seconds */ static int Width; static int Height; static int Loops = 1000; static int Size = 10; static int NBoxes = 10; static void Idle( void ) { glutPostRedisplay(); } static void Display( void ) { double t0, t1; int boxCount; double boxRate; double pixRate; float width = Width; float height = Height; int i, j; glClearColor( 0.0, 0.0, 1.0, 1.0 ); glClear( GL_COLOR_BUFFER_BIT ); t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001; for (i=0; i