summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-07-12 02:32:21 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-07-12 02:32:21 +0000
commitd8bb5ea96704e2a7006f6bd6f3c9cc80c2cb4c73 (patch)
tree6814c812cec72d72634cd78bae09ffea9a9113a9 /progs
parentc04bb519e13dc6f983930736f9747a9d81b13e76 (diff)
call glutDestroyWindow() to allow checking for mem leaks upon exit
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/vao_demo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/progs/demos/vao_demo.c b/progs/demos/vao_demo.c
index e6a89f645b..b037816221 100644
--- a/progs/demos/vao_demo.c
+++ b/progs/demos/vao_demo.c
@@ -45,6 +45,7 @@ static PFNGLISVERTEXARRAYAPPLEPROC is_vertex_array = NULL;
static int Width = 400;
static int Height = 200;
+static int Win = 0;
static const GLfloat Near = 5.0, Far = 25.0;
static GLfloat angle = 0.0;
@@ -258,6 +259,7 @@ static void Key( unsigned char key, int x, int y )
(void) y;
switch (key) {
case 27:
+ glutDestroyWindow(Win);
exit(0);
break;
}
@@ -312,7 +314,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
+ Win = glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );