mesa: destroy window upon exit
This commit is contained in:
@@ -27,6 +27,8 @@
|
|||||||
#define LINEAR_FILTER 21
|
#define LINEAR_FILTER 21
|
||||||
#define QUIT 100
|
#define QUIT 100
|
||||||
|
|
||||||
|
static GLint Win = -1;
|
||||||
|
|
||||||
static GLuint CylinderObj = 0;
|
static GLuint CylinderObj = 0;
|
||||||
static GLboolean Animate = GL_TRUE;
|
static GLboolean Animate = GL_TRUE;
|
||||||
|
|
||||||
@@ -159,6 +161,7 @@ static void Key( unsigned char key, int x, int y )
|
|||||||
glutIdleFunc(NULL);
|
glutIdleFunc(NULL);
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27:
|
||||||
|
glutDestroyWindow(Win);
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -263,7 +266,7 @@ int main( int argc, char *argv[] )
|
|||||||
|
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||||
|
|
||||||
glutCreateWindow(argv[0] );
|
Win = glutCreateWindow(argv[0] );
|
||||||
|
|
||||||
Init(argc, argv);
|
Init(argc, argv);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user