*/
glFlush();
-#if TARGET_HOST_UNIX_X11
/*
* If it's single-buffered, we shouldn't be here.
*/
if ( ! fgStructure.Window->Window.DoubleBuffered ) return ;
+#if TARGET_HOST_UNIX_X11
/*
* Issue the glXSwapBuffers call and be done with it
*/
Window Handle; /* The window's handle */
GLXContext Context; /* The OpenGL context */
XVisualInfo* VisualInfo; /* The window's visual information */
- int DoubleBuffered; /* Treat the window as double-buffered */
#elif TARGET_HOST_WIN32
HWND Handle; /* The window's handle */
HGLRC Context; /* The window's WGL context */
#endif
+
+ int DoubleBuffered; /* Treat the window as double-buffered */
};
/*
freeglut_assert_ready;
/*
- * Save the window's single- or double-buffering state
- */
- window->Window.DoubleBuffered = ( fgState.DisplayMode & GLUT_DOUBLE ) ? 1 : 0 ;
-
- /*
* Here we are upon the stage. Have the visual selected.
*/
window->Window.VisualInfo = fgChooseVisual();
# endif
}
- /*
- * If it's not double-buffered, make sure the rendering is done to the front buffer.
- */
- if ( ! window->Window.DoubleBuffered )
- {
- glDrawBuffer ( GL_FRONT ) ;
- glReadBuffer ( GL_FRONT ) ;
- }
-
#elif TARGET_HOST_WIN32
WNDCLASS wc;
#endif
/*
+ * Save the window's single- or double-buffering state
+ */
+ window->Window.DoubleBuffered = ( fgState.DisplayMode & GLUT_DOUBLE ) ? 1 : 0 ;
+
+ /*
+ * If it's not double-buffered, make sure the rendering is done to the front buffer.
+ */
+ if ( ! window->Window.DoubleBuffered )
+ {
+ glDrawBuffer ( GL_FRONT ) ;
+ glReadBuffer ( GL_FRONT ) ;
+ }
+
+ /*
* Set the newly created window as the current one
*/
fgSetWindow( window );