summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-08-24 10:18:00 -0400
committerJonathan Bradley <jcb@pikum.xyz>2023-08-24 10:18:00 -0400
commit91e15d7f97d24fec6ff5c299de8b9cd116778aae (patch)
treec838a9a9a7220421f0668e384ab2e1ebb38b44e5 /src/main.cpp
parent998ed84c26da259c5b19e228af245e58e0daa7d6 (diff)
add commandBuffer, semaphores, and fence - no binding yet
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 07ac831..d221f50 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -39,6 +39,8 @@ int main() {
while (pkeSettings.isGameRunning) {
+ glfwPollEvents();
+
if (nsAhead > 0) {
std::this_thread::sleep_until(lastTimePoint + GameTimeDuration(nsAhead + 1));
nsAhead = 0;
@@ -79,8 +81,11 @@ int main() {
tickCount = 0;
}
+ pkeSettings.isGameRunning = !glfwWindowShouldClose(window);
}
+ vkDeviceWaitIdle(vkDevice);
+
} catch (const std::exception &exc) {
printf("EXCEPTION: %s\n", exc.what());
} catch (const char *err) {