[Supertux-Commit] r5516 - trunk/supertux/src/video

grumbel at millhouse.dreamhost.com grumbel at millhouse.dreamhost.com
Sun May 25 08:58:47 PDT 2008


Author: grumbel
Date: 2008-05-25 08:58:46 -0700 (Sun, 25 May 2008)
New Revision: 5516

Modified:
   trunk/supertux/src/video/gl_renderer.cpp
Log:
Fixed flicker issue due to dual buffering

Modified: trunk/supertux/src/video/gl_renderer.cpp
===================================================================
--- trunk/supertux/src/video/gl_renderer.cpp	2008-05-24 18:38:55 UTC (rev 5515)
+++ trunk/supertux/src/video/gl_renderer.cpp	2008-05-25 15:58:46 UTC (rev 5516)
@@ -638,8 +638,11 @@
           SCREEN_HEIGHT = static_cast<int>(max_height);
         }
 
-      // Clear so that we get a clean black border without junk
+      // Clear both buffers so that we get a clean black border without junk
       glClear(GL_COLOR_BUFFER_BIT);
+      SDL_GL_SwapBuffers();
+      glClear(GL_COLOR_BUFFER_BIT);
+      SDL_GL_SwapBuffers();
 
       if (0)
         std::cout << (w-nw)/2 << " "




More information about the Supertux-Commit mailing list