-/*
- * Clean up on exit
- */
-static void fgCleanUpGlutsMess( void )
-{
- int i;
-
- i = 0;
-
- if ( fgStructure.Windows.First != NULL )
- {
- SFG_Window *win = (SFG_Window *)fgStructure.Windows.First ;
- glEnd();
- glFinish();
- glFlush();
- while ( win != NULL )
- {
- SFG_Window *temp_win = (SFG_Window *)win->Node.Next ;
- fgDestroyWindow ( win, FALSE ) ;
- win = temp_win ;
- }
- }
-
-#if 0
- /* these are pointers to external handles */
-
- __glutWindowListSize = 0;
- __glutStaleWindowList = NULL;
- __glutWindowList = NULL;
- __glutCurrentWindow = NULL;
-
- /* make sure we no longer have a GL context */
-
- if ( wglGetCurrentContext() != NULL )
- {
- wglDeleteContext( wglGetCurrentContext() );
- }
-
- hInstance = GetModuleHandle(NULL);
- UnregisterClass( classname, hInstance );
-
- /* clean up allocated timer memory */
-
- tList = __glutTimerList;
- i = 0;
-
- while ( __glutTimerList )
- {
- i++;
- tList = __glutTimerList;
-
- if ( __glutTimerList )
- __glutTimerList = __glutTimerList->next;
-
- if ( tList )
- free( tList );
- }
-#endif
-}
-
-