FALSE, /* ForceDirectContext */
TRUE, /* TryDirectContext */
FALSE, /* ForceIconic */
+ FALSE, /* UseCurrentContext */
FALSE, /* GLDebugSwitch */
FALSE, /* XSyncSwitch */
TRUE, /* IgnoreKeyRepeat */
#endif
{ NULL, NULL }, /* Timers */
NULL, /* IdleCallback */
+ FALSE, /* BuildingAMenu */
NULL, /* MenuStateCallback */
NULL, /* MenuStatusCallback */
{ 640, 480, TRUE }, /* GameModeSize */
72, /* GameModeRefresh */
GLUT_ACTION_EXIT, /* ActionOnWindowClose */
GLUT_EXEC_STATE_INIT /* ExecState */
-};
+} ;
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
}
/*
+ * If there was a menu created, destroy the rendering context
+ */
+ if ( fgStructure.MenuContext )
+ {
+ free ( fgStructure.MenuContext ) ;
+ fgStructure.MenuContext = NULL ;
+ }
+
+ /*
* Perform the freeglut structure deinitialization
*/
fgDestroyStructure();
fgState.ForceDirectContext = FALSE;
fgState.TryDirectContext = TRUE;
fgState.ForceIconic = FALSE;
+ fgState.UseCurrentContext = FALSE;
fgState.GLDebugSwitch = FALSE;
fgState.XSyncSwitch = FALSE;
fgState.ActionOnWindowClose = GLUT_ACTION_EXIT ;
/* check if GLUT_FPS env var is set */
{
- const char *fps = getenv("GLUT_FPS");
- if (fps) {
- sscanf(fps, "%d", &fgState.FPSInterval);
- if (fgState.FPSInterval <= 0)
- fgState.FPSInterval = 5000; /* 5000 milliseconds */
- }
+ const char *fps = getenv ( "GLUT_FPS" );
+ if ( fps )
+ {
+ sscanf ( fps, "%d", &fgState.FPSInterval ) ;
+ if ( fgState.FPSInterval <= 0 )
+ fgState.FPSInterval = 5000 ; /* 5000 milliseconds */
+ }
}
/*