- /*
- * Make sure the context is direct when the user wants it forced
- */
- if( fgState.ForceDirectContext && !glXIsDirect( fgDisplay.Display, window->Window.Context ) )
- fgError( "unable to force direct context rendering for window '%s'", title );
+/* window->Window.Context = fgStructure.MenuContext->Context ; */
+ window->Window.Context = glXCreateContext(
+ fgDisplay.Display, window->Window.VisualInfo,
+ NULL, fgState.ForceDirectContext | fgState.TryDirectContext
+ );
+ }
+ else if ( fgState.UseCurrentContext )
+ {
+ window->Window.Context = glXGetCurrentContext();
+
+ if ( ! window->Window.Context )
+ window->Window.Context = glXCreateContext(
+ fgDisplay.Display, window->Window.VisualInfo,
+ NULL, fgState.ForceDirectContext | fgState.TryDirectContext
+ );
+ }
+ else
+ window->Window.Context = glXCreateContext(
+ fgDisplay.Display, window->Window.VisualInfo,
+ NULL, fgState.ForceDirectContext | fgState.TryDirectContext
+ );
+
+ if( fgState.ForceDirectContext &&
+ !glXIsDirect( fgDisplay.Display, window->Window.Context ) )
+ fgError( "unable to force direct context rendering for window '%s'",
+ title );