Fixed flicker issue due to dual buffering
authorIngo Ruhnke <grumbel@gmx.de>
Sun, 25 May 2008 15:58:46 +0000 (15:58 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Sun, 25 May 2008 15:58:46 +0000 (15:58 +0000)
SVN-Revision: 5516

src/video/gl_renderer.cpp

index a2552b6..5700b71 100644 (file)
@@ -638,8 +638,11 @@ Renderer::apply_config()
           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 << " "