#include <GL/freeglut.h>\r
#include "freeglut_internal.h"\r
\r
+\r
+/* Function prototypes */\r
+extern void fgPlatformGlutSwapBuffers( SFG_PlatformDisplay *pDisplayPtr, SFG_Window* CurrentWindow );\r
+\r
+\r
+#if TARGET_HOST_POSIX_X11\r
+void fgPlatformGlutSwapBuffers( SFG_PlatformDisplay *pDisplayPtr, SFG_Window* CurrentWindow )\r
+{\r
+ glXSwapBuffers( pDisplayPtr->Display, CurrentWindow->Window.Handle );\r
+}\r
+#endif\r
+\r
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */\r
\r
/*\r
if( ! fgStructure.CurrentWindow->Window.DoubleBuffered )\r
return;\r
\r
-#if TARGET_HOST_POSIX_X11\r
- glXSwapBuffers( fgDisplay.Display, fgStructure.CurrentWindow->Window.Handle );\r
-#elif TARGET_HOST_MS_WINDOWS\r
- SwapBuffers( fgStructure.CurrentWindow->Window.Device );\r
-#endif\r
+ fgPlatformGlutSwapBuffers( &fgDisplay.pDisplay, fgStructure.CurrentWindow );\r
\r
/* GLUT_FPS env var support */\r
if( fgState.FPSInterval )\r