summaryrefslogtreecommitdiffstats
path: root/progs/util/glutskel.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-07-12 02:34:43 +0000
committerBrian Paul <[email protected]>2006-07-12 02:34:43 +0000
commit59cfd3cd3f3ecc677e3f962b9896e6075d4d7a59 (patch)
tree703435c614c5350f31fc961c97737dae1802547d /progs/util/glutskel.c
parentd8bb5ea96704e2a7006f6bd6f3c9cc80c2cb4c73 (diff)
destroy window upon exit, remove CVS log commentmesa-6_5-20060712
Diffstat (limited to 'progs/util/glutskel.c')
-rw-r--r--progs/util/glutskel.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/progs/util/glutskel.c b/progs/util/glutskel.c
index b203a507a4c..273ed9a2f5a 100644
--- a/progs/util/glutskel.c
+++ b/progs/util/glutskel.c
@@ -1,35 +1,16 @@
-/* $Id: glutskel.c,v 1.2 2004/04/22 00:47:28 brianp Exp $ */
-
-/*
+/**
* A skeleton/template GLUT program
*
* Written by Brian Paul and in the public domain.
*/
-/*
- * $Log: glutskel.c,v $
- * Revision 1.2 2004/04/22 00:47:28 brianp
- * minor clean-ups
- *
- * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
- * Imported sources
- *
- * Revision 1.2 1998/11/07 14:20:14 brianp
- * added simple rotation, animation of cube
- *
- * Revision 1.1 1998/11/07 14:14:37 brianp
- * Initial revision
- *
- */
-
-
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
-
+static int Win;
static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
static GLboolean Anim = GL_FALSE;
@@ -96,6 +77,7 @@ Key(unsigned char key, int x, int y)
Zrot += step;
break;
case 27:
+ glutDestroyWindow(Win);
exit(0);
break;
}
@@ -144,7 +126,7 @@ main(int argc, char *argv[])
glutInitWindowPosition(0, 0);
glutInitWindowSize(400, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
- glutCreateWindow(argv[0]);
+ Win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);