mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Backends: Vulkan: Fixed building with older headers not supporting VK_HEADER_VERSION_COMPLETE. (#8326, #8365)
This commit is contained in:
parent
12963f5231
commit
e1ae7db4cc
1 changed files with 7 additions and 0 deletions
|
|
@ -1159,7 +1159,14 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info)
|
||||||
|
|
||||||
bd->VulkanInitInfo = *info;
|
bd->VulkanInitInfo = *info;
|
||||||
if (bd->VulkanInitInfo.ApiVersion == 0)
|
if (bd->VulkanInitInfo.ApiVersion == 0)
|
||||||
|
{
|
||||||
|
// We don't care about other versions for now, so don't need to make this exhaustive (with #ifdef VK_VERSION_1_X checks)
|
||||||
|
#ifdef VK_HEADER_VERSION_COMPLETE
|
||||||
bd->VulkanInitInfo.ApiVersion = VK_HEADER_VERSION_COMPLETE;
|
bd->VulkanInitInfo.ApiVersion = VK_HEADER_VERSION_COMPLETE;
|
||||||
|
#else
|
||||||
|
bd->VulkanInitInfo.ApiVersion = VK_API_VERSION_1_0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
ImGui_ImplVulkan_CreateDeviceObjects();
|
ImGui_ImplVulkan_CreateDeviceObjects();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue