|
@@ -4,6 +4,7 @@
|
|
// Implemented features:
|
|
// Implemented features:
|
|
// [!] Renderer: User texture binding. Use 'VkDescriptorSet' as ImTextureID. Read the FAQ about ImTextureID! See https://github.com/ocornut/imgui/pull/914 for discussions.
|
|
// [!] Renderer: User texture binding. Use 'VkDescriptorSet' as ImTextureID. Read the FAQ about ImTextureID! See https://github.com/ocornut/imgui/pull/914 for discussions.
|
|
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
|
|
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
|
|
|
|
+// [X] Renderer: Expose selected render state for draw callbacks to use. Access in '(ImGui_ImplXXXX_RenderState*)platform_io.BackendRendererRenderState'.
|
|
|
|
|
|
// Important: on 32-bit systems, user texture binding is only supported if your imconfig file has '#define ImTextureID ImU64'.
|
|
// Important: on 32-bit systems, user texture binding is only supported if your imconfig file has '#define ImTextureID ImU64'.
|
|
// See imgui_impl_vulkan.cpp file for details.
|
|
// See imgui_impl_vulkan.cpp file for details.
|
|
@@ -99,23 +100,33 @@ struct ImGui_ImplVulkan_InitInfo
|
|
};
|
|
};
|
|
|
|
|
|
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
|
|
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
|
|
-IMGUI_IMPL_API bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info);
|
|
|
|
-IMGUI_IMPL_API void ImGui_ImplVulkan_Shutdown();
|
|
|
|
-IMGUI_IMPL_API void ImGui_ImplVulkan_NewFrame();
|
|
|
|
-IMGUI_IMPL_API void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer command_buffer, VkPipeline pipeline = VK_NULL_HANDLE);
|
|
|
|
-IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateFontsTexture();
|
|
|
|
-IMGUI_IMPL_API void ImGui_ImplVulkan_DestroyFontsTexture();
|
|
|
|
-IMGUI_IMPL_API void ImGui_ImplVulkan_SetMinImageCount(uint32_t min_image_count); // To override MinImageCount after initialization (e.g. if swap chain is recreated)
|
|
|
|
|
|
+IMGUI_IMPL_API bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info);
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplVulkan_Shutdown();
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplVulkan_NewFrame();
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer command_buffer, VkPipeline pipeline = VK_NULL_HANDLE);
|
|
|
|
+IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateFontsTexture();
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplVulkan_DestroyFontsTexture();
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplVulkan_SetMinImageCount(uint32_t min_image_count); // To override MinImageCount after initialization (e.g. if swap chain is recreated)
|
|
|
|
|
|
// Register a texture (VkDescriptorSet == ImTextureID)
|
|
// Register a texture (VkDescriptorSet == ImTextureID)
|
|
// FIXME: This is experimental in the sense that we are unsure how to best design/tackle this problem
|
|
// FIXME: This is experimental in the sense that we are unsure how to best design/tackle this problem
|
|
// Please post to https://github.com/ocornut/imgui/pull/914 if you have suggestions.
|
|
// Please post to https://github.com/ocornut/imgui/pull/914 if you have suggestions.
|
|
-IMGUI_IMPL_API VkDescriptorSet ImGui_ImplVulkan_AddTexture(VkSampler sampler, VkImageView image_view, VkImageLayout image_layout);
|
|
|
|
-IMGUI_IMPL_API void ImGui_ImplVulkan_RemoveTexture(VkDescriptorSet descriptor_set);
|
|
|
|
|
|
+IMGUI_IMPL_API VkDescriptorSet ImGui_ImplVulkan_AddTexture(VkSampler sampler, VkImageView image_view, VkImageLayout image_layout);
|
|
|
|
+IMGUI_IMPL_API void ImGui_ImplVulkan_RemoveTexture(VkDescriptorSet descriptor_set);
|
|
|
|
|
|
// Optional: load Vulkan functions with a custom function loader
|
|
// Optional: load Vulkan functions with a custom function loader
|
|
// This is only useful with IMGUI_IMPL_VULKAN_NO_PROTOTYPES / VK_NO_PROTOTYPES
|
|
// This is only useful with IMGUI_IMPL_VULKAN_NO_PROTOTYPES / VK_NO_PROTOTYPES
|
|
-IMGUI_IMPL_API bool ImGui_ImplVulkan_LoadFunctions(PFN_vkVoidFunction(*loader_func)(const char* function_name, void* user_data), void* user_data = nullptr);
|
|
|
|
|
|
+IMGUI_IMPL_API bool ImGui_ImplVulkan_LoadFunctions(PFN_vkVoidFunction(*loader_func)(const char* function_name, void* user_data), void* user_data = nullptr);
|
|
|
|
+
|
|
|
|
+// [BETA] Selected render state data shared with callbacks.
|
|
|
|
+// This is temporarily stored in io.BackendRendererRenderState during the ImGui_ImplVulkan_RenderDrawData() call.
|
|
|
|
+// (Please open an issue if you feel you need access to more data)
|
|
|
|
+struct ImGui_ImplVulkan_RenderState
|
|
|
|
+{
|
|
|
|
+ VkCommandBuffer CommandBuffer;
|
|
|
|
+ VkPipeline Pipeline;
|
|
|
|
+ VkPipelineLayout PipelineLayout;
|
|
|
|
+};
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------
|
|
// Internal / Miscellaneous Vulkan Helpers
|
|
// Internal / Miscellaneous Vulkan Helpers
|