X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_display.c;h=3db6cb55bcdcf5e7a714dd291b174dc99d5911f1;hb=5d724da03c1b5988304888c17c5eba8a40c0a529;hp=de198415fce2791c47d98365ea99cd0697c270f8;hpb=646676b8dbf8ab504ac8a275fe9a63a403a3190b;p=freeglut diff --git a/src/freeglut_display.c b/src/freeglut_display.c index de19841..3db6cb5 100644 --- a/src/freeglut_display.c +++ b/src/freeglut_display.c @@ -29,8 +29,6 @@ #include "config.h" #endif -#define G_LOG_DOMAIN "freeglut-display" - #include "../include/GL/freeglut.h" #include "freeglut_internal.h" @@ -42,14 +40,8 @@ */ void FGAPIENTRY glutPostRedisplay( void ) { - /* - * Is there a current window set? - */ - freeglut_assert_ready; freeglut_assert_window; - - /* - * Just mark the window as one that we need to redisplay... - */ + freeglut_assert_ready; + freeglut_assert_window; fgStructure.Window->State.Redisplay = TRUE; } @@ -58,39 +50,17 @@ void FGAPIENTRY glutPostRedisplay( void ) */ void FGAPIENTRY glutSwapBuffers( void ) { - /* - * As long as we've got a current window set... - */ - freeglut_assert_ready; freeglut_assert_window; - - /* - * Have the mouse cursor and/or the menus drawn for the current window - */ - fgDisplayMenu(); - fgDisplayCursor(); + freeglut_assert_ready; + freeglut_assert_window; - /* - * Make sure the current context is flushed - */ glFlush(); - - /* - * If it's single-buffered, we shouldn't be here. - */ - if ( ! fgStructure.Window->Window.DoubleBuffered ) return ; + if ( ! fgStructure.Window->Window.DoubleBuffered ) + return; #if TARGET_HOST_UNIX_X11 - /* - * Issue the glXSwapBuffers call and be done with it - */ glXSwapBuffers( fgDisplay.Display, fgStructure.Window->Window.Handle ); - #elif TARGET_HOST_WIN32 - /* - * Swap the window's buffers - */ SwapBuffers( fgStructure.Window->Window.Device ); - #endif /* GLUT_FPS env var support */ @@ -118,20 +88,8 @@ void FGAPIENTRY glutPostWindowRedisplay( int windowID ) SFG_Window* window; freeglut_assert_ready; - - /* - * Try looking for the window - */ window = fgWindowByID( windowID ); - - /* - * If failed, return - */ freeglut_return_if_fail( window != NULL ); - - /* - * Otherwise mark the window for being redisplayed - */ window->State.Redisplay = TRUE; }