From 91e15d7f97d24fec6ff5c299de8b9cd116778aae Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 24 Aug 2023 10:18:00 -0400 Subject: add commandBuffer, semaphores, and fence - no binding yet --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.cpp') 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) { -- cgit v1.2.3