mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add framerate control (WIP)
This commit is contained in:
parent
664faf35e9
commit
a856b4f140
6 changed files with 29 additions and 8 deletions
|
|
@ -171,7 +171,8 @@ void Engine::mainloop() {
|
|||
if (!Window::isIconified()) {
|
||||
renderFrame(batch);
|
||||
}
|
||||
Window::swapInterval(Window::isIconified() ? 1 : settings.display.vsync.get());
|
||||
Window::setFramerate(Window::isIconified() ? 20 :
|
||||
settings.display.framerate.get());
|
||||
|
||||
processPostRunnables();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue