Mesa (master): demos: all glutDestroyWindow() upon exit to test query object clean-up
Brian Paul
brianp at kemper.freedesktop.org
Thu Dec 18 18:12:09 UTC 2008
Module: Mesa
Branch: master
Commit: f43019b226b6fa896715f222f7b6bbe5dbccdb37
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f43019b226b6fa896715f222f7b6bbe5dbccdb37
Author: Brian Paul <brian.paul at tungstengraphics.com>
Date: Thu Dec 18 09:48:20 2008 -0700
demos: all glutDestroyWindow() upon exit to test query object clean-up
---
progs/demos/arbocclude.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/progs/demos/arbocclude.c b/progs/demos/arbocclude.c
index ddbb1f1..6bf4fd2 100644
--- a/progs/demos/arbocclude.c
+++ b/progs/demos/arbocclude.c
@@ -37,7 +37,7 @@
static GLboolean Anim = GL_TRUE;
static GLfloat Xpos = 0;
static GLuint OccQuery;
-
+static GLint Win = 0;
static void
@@ -204,6 +204,7 @@ static void Key( unsigned char key, int x, int y )
(void) y;
switch (key) {
case 27:
+ glutDestroyWindow(Win);
exit(0);
break;
case ' ':
@@ -271,7 +272,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
+ Win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
More information about the mesa-commit
mailing list