mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-13 00:24:20 +00:00
Examples: GLFW, Vulkan: GLFW binding viewport tweaks to supports Vulkan better (do not call SwapBuffer, share context etc.). Added DUMMY (empty) platform/viewport interface in the viewport code.
This commit is contained in:
parent
5b282bdd48
commit
9da475e4e8
4 changed files with 123 additions and 10 deletions
|
|
@ -568,10 +568,11 @@ int main(int, char**)
|
|||
init_info.CheckVkResultFn = check_vk_result;
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_MultiViewports;
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
|
||||
ImGui_ImplVulkan_Init(&init_info);
|
||||
ImGui_ImplGlfw_Init(window, true);
|
||||
ImGui_ImplGlfw_InitForVulkan(window, true);
|
||||
|
||||
// Setup style
|
||||
ImGui::StyleColorsDark();
|
||||
|
|
@ -689,6 +690,9 @@ int main(int, char**)
|
|||
ImGui_ImplVulkan_Render(g_CommandBuffer[g_FrameIndex]);
|
||||
frame_end();
|
||||
frame_present();
|
||||
|
||||
ImGui::UpdatePlatformWindows();
|
||||
ImGui::RenderPlatformWindows();
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue