From eff34c523b4816bb06ffbc19e6d368cac35f538c Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 17 Oct 2023 16:49:31 -0400 Subject: large refactor for tick rate and handling vkPresentMode --- src/game.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 5863ecc..a0be182 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -387,6 +387,17 @@ void RecordImGuiEditorWrapper() { } if (ImGui::BeginMenu("Debug")) { ImGui::Checkbox("Show Debug Hitboxes", &pkeSettings.isRenderingDebug); + if (ImGui::Checkbox("Uncap Framerate", &pkeSettings.graphicsSettings.isFramerateUnlocked)) { + shouldRecreateSwapchain = true; + } + if (ImGui::Checkbox("wait for v-sync", &pkeSettings.graphicsSettings.isWaitingForVsync)) { + shouldRecreateSwapchain = true; + } + // ImGui::Checkbox("Uncap Tickrate", &pkeSettings.isTickrateUnlocked); + + ImGuiIO &io = ImGui::GetIO(); + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::EndMenu(); } ImGui::EndMainMenuBar(); @@ -622,8 +633,6 @@ void RecordImGuiSceneEditor() { ImGui::End(); return; } - ImGuiIO &io = ImGui::GetIO(); - ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); if (ImGui::Button("Create Entity Type")) { ImGui::OpenPopup("CreateEntityType"); } -- cgit v1.2.3