summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-04-01 14:56:10 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-04-01 14:56:10 -0600
commit8bef18f47b399ee2ae0a4b69e49f6e3285042e73 (patch)
tree6ed8a243c50122e4564a2e72a10bac1781b29953 /progs
parent9d1444092fbfd9f975cfb996695f0533a78410f7 (diff)
mesa: destroy window upon exit
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/texcyl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/progs/demos/texcyl.c b/progs/demos/texcyl.c
index c04d5004e3..e3b0303975 100644
--- a/progs/demos/texcyl.c
+++ b/progs/demos/texcyl.c
@@ -27,6 +27,8 @@
#define LINEAR_FILTER 21
#define QUIT 100
+static GLint Win = -1;
+
static GLuint CylinderObj = 0;
static GLboolean Animate = GL_TRUE;
@@ -159,6 +161,7 @@ static void Key( unsigned char key, int x, int y )
glutIdleFunc(NULL);
break;
case 27:
+ glutDestroyWindow(Win);
exit(0);
break;
}
@@ -263,7 +266,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
+ Win = glutCreateWindow(argv[0] );
Init(argc, argv);