summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-21 15:41:03 -0700
committerBrian Paul <brianp@vmware.com>2010-01-21 15:41:03 -0700
commite5829ccc2b0cb1eed27c89763e8e4c6775dd6d4c (patch)
tree19ee983509eca8ec8dc72a15e74eda8677388888 /progs
parentcd9d9e2436a0815f6ed3a61d2cdf8fad53278506 (diff)
progs/demos: call glutDestroyWindow() upon exit
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/engine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/progs/demos/engine.c b/progs/demos/engine.c
index 7e485111da..a4148357d4 100644
--- a/progs/demos/engine.c
+++ b/progs/demos/engine.c
@@ -26,6 +26,8 @@
/* Target engine speed: */
const int RPM = 100.0;
+static int Win = 0;
+
/**
* Engine description.
@@ -1154,6 +1156,7 @@ OptRotate(void)
static void
OptExit(void)
{
+ glutDestroyWindow(Win);
exit(0);
}
@@ -1323,7 +1326,7 @@ main(int argc, char *argv[])
glutInitWindowSize(WinWidth, WinHeight);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow("OpenGL Engine Demo");
+ Win = glutCreateWindow("OpenGL Engine Demo");
glewInit();
glutReshapeFunc(Reshape);
glutMouseFunc(Mouse);