diff options
Diffstat (limited to 'src/redbook/polys.c')
-rw-r--r-- | src/redbook/polys.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/redbook/polys.c b/src/redbook/polys.c index 4889c54f..3d2ce062 100644 --- a/src/redbook/polys.c +++ b/src/redbook/polys.c @@ -44,6 +44,8 @@ #include <stdlib.h> #include "glut_wrap.h" +static int win; + static void display(void) { GLubyte fly[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -111,6 +113,7 @@ key(unsigned char k, int x, int y) { switch (k) { case 27: /* Escape */ + glutDestroyWindow(win); exit(0); break; default: @@ -128,7 +131,7 @@ int main(int argc, char** argv) glutInit(&argc, argv); glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); glutInitWindowSize (350, 150); - glutCreateWindow (argv[0]); + win = glutCreateWindow (argv[0]); myinit (); glutDisplayFunc(display); glutReshapeFunc(reshape); |