From c743953d48f92e2b597ceabe3ac583bbbe8b1be7 Mon Sep 17 00:00:00 2001 From: Lukasz Stalmirski Date: Wed, 2 Sep 2026 20:20:58 +0200 Subject: [PATCH] Fix build error with IMGUI_IMPL_VULKAN_USE_LOADER disabled --- backends/imgui_impl_vulkan.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_vulkan.cpp b/backends/imgui_impl_vulkan.cpp index 3d31dbf7f..419eb0b83 100644 --- a/backends/imgui_impl_vulkan.cpp +++ b/backends/imgui_impl_vulkan.cpp @@ -245,7 +245,8 @@ static ImGui_ImplVulkan_Functions& ImGui_ImplVulkan_GetFunctions(); // Wrap each Vulkan function pointer to properly dispatch it using the current backend data #define IMGUI_VULKAN_FUNC_WRAPPER(func) \ template \ - auto func(Args&&... args) { \ + auto func(Args&&... args) -> decltype(ImGui_ImplVulkan_GetFunctions().pfn_##func(args...)) \ + { \ return ImGui_ImplVulkan_GetFunctions().pfn_##func(args...); \ } IMGUI_VULKAN_FUNC_MAP(IMGUI_VULKAN_FUNC_WRAPPER) @@ -1423,7 +1424,9 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info) IM_ASSERT(info->PipelineInfoMain.RenderPass == VK_NULL_HANDLE); bd->VulkanInitInfo = *info; +#ifdef IMGUI_IMPL_VULKAN_USE_LOADER bd->Functions = ImGuiImplVulkanFuncs; +#endif VkPhysicalDeviceProperties properties; vkGetPhysicalDeviceProperties(info->PhysicalDevice, &properties);