From 6ddd117edfb88b62e4a1332386b8b47202c9db71 Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 23 Jun 2004 00:33:37 +0000 Subject: [PATCH] Moved the screen clearing code out of the texture creation method and into the createscreen method. Under Windows, it didn't matter, since createTextures() was called every time createScreen() was. Under Linux, createTextures() is only ever called once. Hence, the screen is never cleared. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@277 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/common/FrameBufferGL.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stella/src/common/FrameBufferGL.cxx b/stella/src/common/FrameBufferGL.cxx index 4d3e49ff5..72a775c3c 100644 --- a/stella/src/common/FrameBufferGL.cxx +++ b/stella/src/common/FrameBufferGL.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBufferGL.cxx,v 1.3 2004-06-23 00:15:32 stephena Exp $ +// $Id: FrameBufferGL.cxx,v 1.4 2004-06-23 00:33:37 stephena Exp $ //============================================================================ #include @@ -103,6 +103,12 @@ bool FrameBufferGL::createScreen() createTextures(); #endif + // Make sure any old parts of the screen are erased + // Do it for both buffers! + glClear(GL_COLOR_BUFFER_BIT); + SDL_GL_SwapBuffers(); + glClear(GL_COLOR_BUFFER_BIT); + theRedrawEntireFrameIndicator = true; return true; } @@ -482,12 +488,6 @@ bool FrameBufferGL::createTextures() glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); - // Make sure any old parts of the screen are erased - // Do it for both buffers! - glClear(GL_COLOR_BUFFER_BIT); - SDL_GL_SwapBuffers(); - glClear(GL_COLOR_BUFFER_BIT); - return true; }