From: Fay J. F C. AAC/W. <joh...@eg...> - 2002-10-28 13:51:36
|
Gentlemen, I would like to add a new variable to the "SFG_State" structure which would keep track of the execution state. This will be handy for two immediate reasons, and possibly more in the future. First, it will allow us better control over the action taken when the user clicks on an "x" to close a window: if we set the execution state to "stopping," we can drop out of the main loop and clean up, then either exiting or returning to the main program. Second, it will (I think--I haven't chased this all the way through the code) allow a better fix to the problem that freeglut doesn't call the visibility callback at the start of the main loop. What I propose specifically is to create an enumeration: typedef enum { GLUT_EXEC_STATE_INIT, GLUT_EXEC_STATE_RUNNING, GLUT_EXEC_STATE_STOP } fgExecutionState ; and then another variable inside the "TagSFG_State" structure: fgExecutionState exec_state ; Is this all right with people? Does anybody have a better way to do this? John F. Fay joh...@eg... |