summaryrefslogtreecommitdiffstats
path: root/progs/tests/mipmap_view.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-18 15:36:17 -0600
committerBrian Paul <[email protected]>2008-09-18 15:37:13 -0600
commita9004cc79cd9287305f36254194e2477ce871765 (patch)
tree047aae350e1a97d0fd6a9d7324ff522208c80820 /progs/tests/mipmap_view.c
parent8d249ca620f6995cc5824d95c29bda7043bbdf8c (diff)
destroy window on exit
Diffstat (limited to 'progs/tests/mipmap_view.c')
-rw-r--r--progs/tests/mipmap_view.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/progs/tests/mipmap_view.c b/progs/tests/mipmap_view.c
index 117e2017184..54607b89398 100644
--- a/progs/tests/mipmap_view.c
+++ b/progs/tests/mipmap_view.c
@@ -21,6 +21,8 @@ static int TexWidth = 256, TexHeight = 256;
static int WinWidth = 1044, WinHeight = 900;
static GLfloat Bias = 0.0;
static GLboolean ScaleQuads = GL_FALSE;
+static GLint Win = 0;
+
static void
@@ -145,6 +147,7 @@ Key(unsigned char key, int x, int y)
ScaleQuads = !ScaleQuads;
break;
case 27:
+ glutDestroyWindow(Win);
exit(0);
break;
}
@@ -238,7 +241,7 @@ main(int argc, char *argv[])
glutInitWindowPosition(0, 0);
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
- glutCreateWindow(argv[0]);
+ Win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);