# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1289248651 0 # Node ID e8a799239384c7fa380a5f440ce905880d42f2aa # Parent a5809f60d548847a97975d5cc522ee9284f1db43 * This fixes the case were the engine would clear the screen twice The editor and demos now suffer from a problem where if a map is not loaded the screen doesnt get cleared and you see traces of the UI from previous frames. For now the editor, RPG demo and Shooter force the engine to clear the screen every frame. This is not ideal as once a map is loaded they will be clearing the screen twice per frame. diff -r a5809f60d548 -r e8a799239384 engine/core/video/renderbackend.cpp --- a/engine/core/video/renderbackend.cpp Mon Nov 08 18:21:05 2010 +0000 +++ b/engine/core/video/renderbackend.cpp Mon Nov 08 20:37:31 2010 +0000 @@ -58,7 +58,7 @@ void RenderBackend::pushClipArea(const Rect& cliparea, bool clear) { assert(m_screen); m_screen->pushClipArea(cliparea, clear); - } + } void RenderBackend::popClipArea() { assert(m_screen); diff -r a5809f60d548 -r e8a799239384 engine/core/video/sdl/renderbackendsdl.cpp --- a/engine/core/video/sdl/renderbackendsdl.cpp Mon Nov 08 18:21:05 2010 +0000 +++ b/engine/core/video/sdl/renderbackendsdl.cpp Mon Nov 08 20:37:31 2010 +0000 @@ -42,7 +42,7 @@ static Logger _log(LM_VIDEO); RenderBackendSDL::RenderBackendSDL(const SDL_Color& colorkey) : RenderBackend(colorkey) { - m_clear = true; + m_clear = false; } @@ -199,7 +199,7 @@ void RenderBackendSDL::changeBlending(int scr, int dst){ } - + bool RenderBackendSDL::putPixel(int x, int y, int r, int g, int b, int a) { return static_cast(m_screen)->putPixel(x, y, r, g, b, a); } diff -r a5809f60d548 -r e8a799239384 engine/core/view/camera.cpp --- a/engine/core/view/camera.cpp Mon Nov 08 18:21:05 2010 +0000 +++ b/engine/core/view/camera.cpp Mon Nov 08 20:37:31 2010 +0000 @@ -452,7 +452,6 @@ if(trec1 && trec2 && trec3 && trec4) { return false; } - m_renderbackend->clearBackBuffer(); return true; } diff -r a5809f60d548 -r e8a799239384 tools/editor/scripts/editor.py --- a/tools/editor/scripts/editor.py Mon Nov 08 18:21:05 2010 +0000 +++ b/tools/editor/scripts/editor.py Mon Nov 08 20:37:31 2010 +0000 @@ -104,6 +104,8 @@ ApplicationBase.__init__(self, TDS, *args, **kwargs) MainWindow.__init__(self, *args, **kwargs) + self.engine.getRenderBackend().setClearBackBuffer(True) + def _initTools(self): """ Initializes tools """ self._pluginmanager = plugin.PluginManager(self.getSettings())