From: Ingo Ruhnke Date: Wed, 30 Jul 2014 17:38:33 +0000 (+0200) Subject: Fixed black borders in GL renderer X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cb11958a5a4ec598a7cf10ba5fc15d25e1fe9c2c;p=supertux.git Fixed black borders in GL renderer --- diff --git a/src/video/gl/gl_renderer.cpp b/src/video/gl/gl_renderer.cpp index 9d2010850..991e3aa21 100644 --- a/src/video/gl/gl_renderer.cpp +++ b/src/video/gl/gl_renderer.cpp @@ -581,13 +581,11 @@ GLRenderer::apply_config() SCREEN_HEIGHT = static_cast(max_size.height); } -#ifdef OLD_SDL1 // Clear both buffers so that we get a clean black border without junk glClear(GL_COLOR_BUFFER_BIT); - SDL_GL_SwapWindow(screen); + SDL_GL_SwapWindow(window); glClear(GL_COLOR_BUFFER_BIT); - SDL_GL_SwapWindow(screen); -#endif + SDL_GL_SwapWindow(window); glViewport(std::max(0, (screen_size.width - new_size.width) / 2), std::max(0, (screen_size.height - new_size.height) / 2),