comparison engine/core/controller/engine.cpp @ 669:46258f467c8c

* Fixed the clear screen problems. The screen is now automatically cleared every frame by the engine if there are no maps loaded. In the process I removed the setClearBackBuffer() function from the RenderBackend.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 08 Nov 2010 21:36:38 +0000
parents 3944096d12ce
children ca1fcb96907d
comparison
equal deleted inserted replaced
668:e8a799239384 669:46258f467c8c
361 361
362 void Engine::pump() { 362 void Engine::pump() {
363 m_eventmanager->processEvents(); 363 m_eventmanager->processEvents();
364 m_renderbackend->startFrame(); 364 m_renderbackend->startFrame();
365 m_timemanager->update(); 365 m_timemanager->update();
366
367 if (m_model->getNumMaps() == 0) {
368 m_renderbackend->clearBackBuffer();
369 }
370
366 m_model->update(); 371 m_model->update();
367 #ifdef HAVE_OPENGL 372 #ifdef HAVE_OPENGL
368 if (m_settings.getLightingModel() == 1) { 373 if (m_settings.getLightingModel() == 1) {
369 m_renderbackend->disableLighting(); 374 m_renderbackend->disableLighting();
370 } 375 }