mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
lua: core.open_world
This commit is contained in:
parent
0140fb8e3e
commit
567c8a365f
3 changed files with 31 additions and 6 deletions
|
|
@ -165,6 +165,12 @@ void Engine::mainloop() {
|
|||
} else {
|
||||
Window::swapInterval(1);
|
||||
}
|
||||
|
||||
while (!postRunnables.empty()) {
|
||||
postRunnables.front()();
|
||||
postRunnables.pop();
|
||||
}
|
||||
|
||||
Window::swapBuffers();
|
||||
Events::pollEvents();
|
||||
}
|
||||
|
|
@ -311,3 +317,7 @@ ResPaths* Engine::getResPaths() {
|
|||
std::shared_ptr<Screen> Engine::getScreen() {
|
||||
return screen;
|
||||
}
|
||||
|
||||
void Engine::postRunnable(runnable callback) {
|
||||
postRunnables.push(callback);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue