mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-19 06:26:35 +00:00
Examples: Vulkan: Fixed GLFW calls.
This commit is contained in:
parent
3bd3693fb7
commit
230c5ca735
@ -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.
|
// 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
|
#ifdef IMGUI_UNLIMITED_FRAME_RATE
|
||||||
ImGui_ImplVulkan_NewFrame();
|
ImGui_ImplVulkan_NewFrame();
|
||||||
|
ImGui_ImplGlfw_NewFrame();
|
||||||
frame_begin();
|
frame_begin();
|
||||||
ImGui_ImplVulkan_Render(g_CommandBuffer[g_FrameIndex]);
|
ImGui_ImplVulkan_Render(g_CommandBuffer[g_FrameIndex]);
|
||||||
frame_end();
|
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.
|
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
ImGui_ImplVulkan_NewFrame();
|
ImGui_ImplVulkan_NewFrame();
|
||||||
|
ImGui_ImplGlfw_NewFrame();
|
||||||
|
|
||||||
// 1. Show a simple window.
|
// 1. Show a simple window.
|
||||||
// Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
|
// 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);
|
VkResult err = vkDeviceWaitIdle(g_Device);
|
||||||
check_vk_result(err);
|
check_vk_result(err);
|
||||||
ImGui_ImplVulkan_Shutdown();
|
ImGui_ImplVulkan_Shutdown();
|
||||||
|
ImGui_ImplGlfw_Shutdown();
|
||||||
ImGui::DestroyContext();
|
ImGui::DestroyContext();
|
||||||
cleanup_vulkan();
|
cleanup_vulkan();
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
|
Loading…
Reference in New Issue
Block a user