- /*
- * XXX fgChooseVisual() is a common part of all three.
- * XXX With a little thought, we should be able to greatly
- * XXX simplify this.
- */
- if( !window->IsMenu )
- window->Window.VisualInfo = fgChooseVisual( );
- else if( fgStructure.MenuContext )
- window->Window.VisualInfo = fgChooseVisual( );
- else
- {
- /* XXX Why are menus double- and depth-buffered? */
- unsigned int current_DisplayMode = fgState.DisplayMode ;
- fgState.DisplayMode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ;
- window->Window.VisualInfo = fgChooseVisual( );
+ window->Window.VisualInfo = fgChooseVisual( );
+
+ if( window->IsMenu && ( ! fgStructure.MenuContext ) )