*/
void Graphics_Display()
{
+ //Check whether the runstate has been set to quit the program
+ switch (runstate)
+ {
+ case RUN:
+ break;
+ case QUIT:
+ exit(EXIT_SUCCESS);
+ break;
+ case QUIT_ERROR:
+ exit(EXIT_FAILURE);
+ break;
+ }
+
+ //Check if window exists, quit if it doesn't
+ if (glutGetWindow() == 0)
+ {
+ exit(EXIT_SUCCESS);
+ }
+
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
{
if (theKey == 'x' || theKey == 'X')
{
- printf("Kill recieved\n");
exit(EXIT_SUCCESS);
}