comparison engine/core/video/sdl/renderbackendsdl.cpp @ 668:e8a799239384

* 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.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 08 Nov 2010 20:37:31 +0000
parents e3140f01749d
children 46258f467c8c
comparison
equal deleted inserted replaced
667:a5809f60d548 668:e8a799239384
40 40
41 namespace FIFE { 41 namespace FIFE {
42 static Logger _log(LM_VIDEO); 42 static Logger _log(LM_VIDEO);
43 43
44 RenderBackendSDL::RenderBackendSDL(const SDL_Color& colorkey) : RenderBackend(colorkey) { 44 RenderBackendSDL::RenderBackendSDL(const SDL_Color& colorkey) : RenderBackend(colorkey) {
45 m_clear = true; 45 m_clear = false;
46 } 46 }
47 47
48 48
49 RenderBackendSDL::~RenderBackendSDL() { 49 RenderBackendSDL::~RenderBackendSDL() {
50 deinit(); 50 deinit();
197 void RenderBackendSDL::setAlphaTest(float ref_alpha) { 197 void RenderBackendSDL::setAlphaTest(float ref_alpha) {
198 } 198 }
199 199
200 void RenderBackendSDL::changeBlending(int scr, int dst){ 200 void RenderBackendSDL::changeBlending(int scr, int dst){
201 } 201 }
202 202
203 bool RenderBackendSDL::putPixel(int x, int y, int r, int g, int b, int a) { 203 bool RenderBackendSDL::putPixel(int x, int y, int r, int g, int b, int a) {
204 return static_cast<SDLImage*>(m_screen)->putPixel(x, y, r, g, b, a); 204 return static_cast<SDLImage*>(m_screen)->putPixel(x, y, r, g, b, a);
205 } 205 }
206 206
207 void RenderBackendSDL::drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a) { 207 void RenderBackendSDL::drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a) {