X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2FCommon%2Ffreeglut_display.c;h=086d24a15f8101ad263039e5fdb7d5016985fbd3;hb=814beaa77f437cf4cf6cac9f748235488f6478a1;hp=fadd3b360c8a61a912580a261a4d45f4b91da6e2;hpb=d2f7ea29ea6d946f455f4363c3f058ff2bdfba35;p=freeglut diff --git a/src/Common/freeglut_display.c b/src/Common/freeglut_display.c index fadd3b3..086d24a 100644 --- a/src/Common/freeglut_display.c +++ b/src/Common/freeglut_display.c @@ -28,6 +28,18 @@ #include #include "freeglut_internal.h" + +/* Function prototypes */ +extern void fgPlatformGlutSwapBuffers( SFG_PlatformDisplay *pDisplayPtr, SFG_Window* CurrentWindow ); + + +#if TARGET_HOST_POSIX_X11 +void fgPlatformGlutSwapBuffers( SFG_PlatformDisplay *pDisplayPtr, SFG_Window* CurrentWindow ) +{ + glXSwapBuffers( pDisplayPtr->Display, CurrentWindow->Window.Handle ); +} +#endif + /* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* @@ -61,11 +73,7 @@ void FGAPIENTRY glutSwapBuffers( void ) if( ! fgStructure.CurrentWindow->Window.DoubleBuffered ) return; -#if TARGET_HOST_POSIX_X11 - glXSwapBuffers( fgDisplay.Display, fgStructure.CurrentWindow->Window.Handle ); -#elif TARGET_HOST_MS_WINDOWS - SwapBuffers( fgStructure.CurrentWindow->Window.Device ); -#endif + fgPlatformGlutSwapBuffers( &fgDisplay.pDisplay, fgStructure.CurrentWindow ); /* GLUT_FPS env var support */ if( fgState.FPSInterval )