+ if ( fgState.BuildingAMenu )
+ {
+ /*
+ * Setup the pixel format of our window
+ */
+ unsigned int current_DisplayMode = fgState.DisplayMode ;
+ fgState.DisplayMode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ;
+ fgSetupPixelFormat( window, FALSE, PFD_MAIN_PLANE );
+ fgState.DisplayMode = current_DisplayMode ;
+
+ /*
+ * If there isn't already an OpenGL rendering context for menu windows, make one
+ */
+ if ( !fgStructure.MenuContext )
+ {
+ fgStructure.MenuContext = (SFG_MenuContext *)malloc ( sizeof(SFG_MenuContext) ) ;
+ fgStructure.MenuContext->Context = wglCreateContext( window->Window.Device );
+ }
+ else
+ wglMakeCurrent ( window->Window.Device, fgStructure.MenuContext->Context ) ;
+
+/* window->Window.Context = wglGetCurrentContext () ; */