+ if ( fgState.BuildingAMenu )
+ {
+ /*
+ * 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->VisualInfo = window->Window.VisualInfo ;
+ fgStructure.MenuContext->Context = glXCreateContext(
+ fgDisplay.Display, fgStructure.MenuContext->VisualInfo,
+ NULL, fgState.ForceDirectContext | fgState.TryDirectContext
+ );
+ }
+
+/* window->Window.Context = fgStructure.MenuContext->Context ; */
+ window->Window.Context = glXCreateContext(
+ fgDisplay.Display, window->Window.VisualInfo,
+ NULL, fgState.ForceDirectContext | fgState.TryDirectContext
+ );
+ }
+ else if ( fgState.UseCurrentContext == TRUE )