first ticks for win32
This commit is contained in:
parent
5254b8d230
commit
e281853a0c
|
@ -76,12 +76,12 @@ void Engine::run()
|
||||||
lastFrameTicks = ticks;
|
lastFrameTicks = ticks;
|
||||||
|
|
||||||
// render only when visible
|
// render only when visible
|
||||||
if(Platform::isWindowVisible()) {
|
//if(Platform::isWindowVisible()) {
|
||||||
render();
|
render();
|
||||||
|
|
||||||
// swap buffers
|
// swap buffers
|
||||||
Platform::swapBuffers();
|
Platform::swapBuffers();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
lastFrameTicks = 0;
|
lastFrameTicks = 0;
|
||||||
|
|
|
@ -62,6 +62,9 @@ void Platform::init(const char *appName)
|
||||||
|
|
||||||
if(!RegisterClassA(&wc))
|
if(!RegisterClassA(&wc))
|
||||||
fatal("Failed to register the window class.");
|
fatal("Failed to register the window class.");
|
||||||
|
|
||||||
|
// force first tick
|
||||||
|
Platform::getTicks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Platform::terminate()
|
void Platform::terminate()
|
||||||
|
|
Loading…
Reference in New Issue