From 01de69de366bac816328a112dce4ffcff59ddee8 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 5 Apr 2019 00:25:42 +0200 Subject: [PATCH] Vulkan: Note for unsupported feature with multi-viewports. (#2071) --- examples/imgui_impl_vulkan.cpp | 4 +++- examples/imgui_impl_vulkan.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/imgui_impl_vulkan.cpp b/examples/imgui_impl_vulkan.cpp index 5956571b..43d8d4d9 100644 --- a/examples/imgui_impl_vulkan.cpp +++ b/examples/imgui_impl_vulkan.cpp @@ -783,10 +783,12 @@ void ImGui_ImplVulkan_NewFrame() { } -// FIXME-VIEWPORT: Need to recreate all swap chains? void ImGui_ImplVulkan_SetSwapChainMinImageCount(int min_image_count) { IM_ASSERT(min_image_count >= 2); + if (g_VulkanInitInfo.MinImageCount == min_image_count) + return; + IM_ASSERT(0); // FIXME-VIEWPORT: Need to recreate all swap chains? g_VulkanInitInfo.MinImageCount = min_image_count; } diff --git a/examples/imgui_impl_vulkan.h b/examples/imgui_impl_vulkan.h index c160b060..1b156fec 100644 --- a/examples/imgui_impl_vulkan.h +++ b/examples/imgui_impl_vulkan.h @@ -61,7 +61,7 @@ IMGUI_IMPL_API void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, V IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer); IMGUI_IMPL_API void ImGui_ImplVulkan_DestroyFontUploadObjects(); IMGUI_IMPL_API void ImGui_ImplVulkan_DestroyFrameRenderBuffers(VkInstance instance, VkDevice device, ImGui_ImplVulkan_FrameRenderBuffers* buffers, const VkAllocationCallbacks* allocator); -IMGUI_IMPL_API void ImGui_ImplVulkan_SetSwapChainMinImageCount(int frames_queue_size); // To override MinImageCount after initialization +IMGUI_IMPL_API void ImGui_ImplVulkan_SetSwapChainMinImageCount(int min_image_count); // To override MinImageCount after initialization // Called by ImGui_ImplVulkan_Init(), might be useful elsewhere. IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateDeviceObjects();