From e281853a0cfd23e836765d8c61efb27ae7926086 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Sat, 2 Apr 2011 14:32:54 -0300 Subject: [PATCH] first ticks for win32 --- src/framework/engine.cpp | 4 ++-- src/framework/win32platform.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/framework/engine.cpp b/src/framework/engine.cpp index d7516a2b..c5a77f28 100644 --- a/src/framework/engine.cpp +++ b/src/framework/engine.cpp @@ -76,12 +76,12 @@ void Engine::run() lastFrameTicks = ticks; // render only when visible - if(Platform::isWindowVisible()) { + //if(Platform::isWindowVisible()) { render(); // swap buffers Platform::swapBuffers(); - } + //} } lastFrameTicks = 0; diff --git a/src/framework/win32platform.cpp b/src/framework/win32platform.cpp index 408ab1cb..1d834951 100644 --- a/src/framework/win32platform.cpp +++ b/src/framework/win32platform.cpp @@ -62,6 +62,9 @@ void Platform::init(const char *appName) if(!RegisterClassA(&wc)) fatal("Failed to register the window class."); + + // force first tick + Platform::getTicks(); } void Platform::terminate()