void fgSetWindow ( SFG_Window *window )
{
#if TARGET_HOST_UNIX_X11
+ if ( window )
+ {
/*
* Make the selected window's GLX context the current one
*/
window->Window.Handle,
window->Window.Context
);
-
+ }
#elif TARGET_HOST_WIN32
/*
* Release the previous' context's device context
*/
fgState.DisplayMode |= GLUT_DOUBLE ;
window->Window.VisualInfo = fgChooseVisual();
+ /* OK, we got a double-buffered window, but we only wanted
+ * single-buffered. Clear the double-buffer flag now.
+ */
+ fgState.DisplayMode &= ~GLUT_DOUBLE ;
}
/*