From 230c5ca735fa34dd82978a60d17f6bfeb39c7176 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 18 Feb 2018 21:15:41 +0100 Subject: [PATCH] Examples: Vulkan: Fixed GLFW calls. --- examples/vulkan_example/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp index 3a10afd2..37acdea2 100644 --- a/examples/vulkan_example/main.cpp +++ b/examples/vulkan_example/main.cpp @@ -684,6 +684,7 @@ int main(int, char**) // This is also the reason why frame_end() is split into frame_end() and frame_present(), the later one not being called here. #ifdef IMGUI_UNLIMITED_FRAME_RATE ImGui_ImplVulkan_NewFrame(); + ImGui_ImplGlfw_NewFrame(); frame_begin(); ImGui_ImplVulkan_Render(g_CommandBuffer[g_FrameIndex]); frame_end(); @@ -699,6 +700,7 @@ int main(int, char**) // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. glfwPollEvents(); ImGui_ImplVulkan_NewFrame(); + ImGui_ImplGlfw_NewFrame(); // 1. Show a simple window. // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug". @@ -748,6 +750,7 @@ int main(int, char**) VkResult err = vkDeviceWaitIdle(g_Device); check_vk_result(err); ImGui_ImplVulkan_Shutdown(); + ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); cleanup_vulkan(); glfwTerminate();