Merge branch 'master' of github.com:edubart/otclient

This commit is contained in:
Henrique Santiago 2011-03-20 20:10:39 -03:00
commit e107daf5dd
1 changed files with 6 additions and 4 deletions

View File

@ -75,11 +75,13 @@ void Engine::run()
update(ticks - lastFrameTicks);
lastFrameTicks = ticks;
// render
render();
// render only when visible
if(Platform::isWindowVisible()) {
render();
// swap buffers
Platform::swapBuffers();
// swap buffers
Platform::swapBuffers();
}
}
lastFrameTicks = 0;