X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=freeglut-1.3%2Ffreeglut_window.c;h=7bd5700ff3283e4a4d7b5a9905138925cc986ba3;hb=2f63f5a7fca80d46618c54683906ac1643d0aba4;hp=7d67b61939ca103c4b1c82e56922b0b778cadff0;hpb=583baa8756a71ed088b8e46c52a945218037314c;p=freeglut diff --git a/freeglut-1.3/freeglut_window.c b/freeglut-1.3/freeglut_window.c index 7d67b61..7bd5700 100644 --- a/freeglut-1.3/freeglut_window.c +++ b/freeglut-1.3/freeglut_window.c @@ -361,11 +361,6 @@ void fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, i 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(); @@ -541,15 +536,6 @@ void fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, i # 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; @@ -637,6 +623,20 @@ void fgOpenWindow( SFG_Window* window, const char* title, int x, int y, int w, i #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 );