From 5fc3d7e7f2aadfd93d51421de3a02dda449035b1 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Sun, 25 May 2008 15:58:46 +0000 Subject: [PATCH] Fixed flicker issue due to dual buffering SVN-Revision: 5516 --- src/video/gl_renderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/gl_renderer.cpp b/src/video/gl_renderer.cpp index a2552b6f2..5700b710d 100644 --- a/src/video/gl_renderer.cpp +++ b/src/video/gl_renderer.cpp @@ -638,8 +638,11 @@ Renderer::apply_config() SCREEN_HEIGHT = static_cast(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 << " " -- 2.11.0