destroy window on exit
authorBrian <brian@nostromo.localnet.net>
Sun, 25 Mar 2007 16:25:29 +0000 (10:25 -0600)
committerBrian <brian@nostromo.localnet.net>
Sun, 25 Mar 2007 16:25:29 +0000 (10:25 -0600)
progs/tests/fbotest2.c

index c3117b0f76768d03034ea3d32e6f80b129339344..18f28972b6eab70c6216d219945c69f49ff427fc 100644 (file)
@@ -13,6 +13,7 @@
 #include <math.h>
 #include <GL/glut.h>
 
+static int Win = 0;
 static int Width = 400, Height = 400;
 static GLuint MyFB, ColorRb, DepthRb;
 static GLboolean Animate = GL_TRUE;
@@ -110,6 +111,7 @@ CleanUp(void)
    assert(!glIsFramebufferEXT(MyFB));
    assert(!glIsRenderbufferEXT(ColorRb));
    assert(!glIsRenderbufferEXT(DepthRb));
+   glutDestroyWindow(Win);
    exit(0);
 }
 
@@ -187,7 +189,7 @@ main( int argc, char *argv[] )
    glutInitWindowPosition( 0, 0 );
    glutInitWindowSize(Width, Height);
    glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
-   glutCreateWindow(argv[0]);
+   Win = glutCreateWindow(argv[0]);
    glutReshapeFunc( Reshape );
    glutKeyboardFunc( Key );
    glutDisplayFunc( Display );