demos: update fbotexture.c to use EXT or ARB functions exclusively
[mesa.git] / progs / demos / texcyl.c
index c04d5004e37572f6ee2355ef0b220db2f442765e..0e6089bced54e977eefff53845d16e28b5cc9686 100644 (file)
@@ -27,6 +27,8 @@
 #define LINEAR_FILTER 21
 #define QUIT 100
 
+static GLint Win = -1;
+
 static GLuint CylinderObj = 0;
 static GLboolean Animate = GL_TRUE;
 
@@ -77,6 +79,7 @@ static void Display( void )
          GLfloat seconds = (t - T0) / 1000.0;
          GLfloat fps = Frames / seconds;
          printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
+         fflush(stdout);
          T0 = t;
          Frames = 0;
       }
@@ -159,6 +162,7 @@ static void Key( unsigned char key, int x, int y )
          glutIdleFunc(NULL);
       break;
       case 27:
+         glutDestroyWindow(Win);
          exit(0);
          break;
    }
@@ -263,7 +267,7 @@ int main( int argc, char *argv[] )
 
    glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 
-   glutCreateWindow(argv[0] );
+   Win = glutCreateWindow(argv[0] );
 
    Init(argc, argv);