Skip to content

Commit 12963f5

Browse files
committed
Examples: Vulkan: make ApiVersion a little more visible in examples. (ocornut#8326, ocornut#8365)
1 parent 890ead6 commit 12963f5

File tree

5 files changed

+5
-1
lines changed

5 files changed

+5
-1
lines changed

backends/imgui_impl_vulkan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
// - When using dynamic rendering, set UseDynamicRendering=true and fill PipelineRenderingCreateInfo structure.
7676
struct ImGui_ImplVulkan_InitInfo
7777
{
78-
uint32_t ApiVersion; // Fill with API version of Instance, e.g. VK_API_VERSION_1_3, which might be lower than header version (VK_HEADER_VERSION_COMPLETE)
78+
uint32_t ApiVersion; // Fill with API version of Instance, e.g. VK_API_VERSION_1_3 or your value of VkApplicationInfo::apiVersion. May be lower than header version (VK_HEADER_VERSION_COMPLETE)
7979
VkInstance Instance;
8080
VkPhysicalDevice PhysicalDevice;
8181
VkDevice Device;

examples/example_glfw_vulkan/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ int main(int, char**)
396396
// Setup Platform/Renderer backends
397397
ImGui_ImplGlfw_InitForVulkan(window, true);
398398
ImGui_ImplVulkan_InitInfo init_info = {};
399+
//init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
399400
init_info.Instance = g_Instance;
400401
init_info.PhysicalDevice = g_PhysicalDevice;
401402
init_info.Device = g_Device;

examples/example_sdl2_vulkan/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ int main(int, char**)
396396
// Setup Platform/Renderer backends
397397
ImGui_ImplSDL2_InitForVulkan(window);
398398
ImGui_ImplVulkan_InitInfo init_info = {};
399+
//init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
399400
init_info.Instance = g_Instance;
400401
init_info.PhysicalDevice = g_PhysicalDevice;
401402
init_info.Device = g_Device;

examples/example_sdl3_vulkan/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ int main(int, char**)
400400
// Setup Platform/Renderer backends
401401
ImGui_ImplSDL3_InitForVulkan(window);
402402
ImGui_ImplVulkan_InitInfo init_info = {};
403+
//init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
403404
init_info.Instance = g_Instance;
404405
init_info.PhysicalDevice = g_PhysicalDevice;
405406
init_info.Device = g_Device;

examples/example_win32_vulkan/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ int main(int, char**)
387387
// Setup Platform/Renderer backends
388388
ImGui_ImplWin32_Init(hwnd);
389389
ImGui_ImplVulkan_InitInfo init_info = {};
390+
//init_info.ApiVersion = VK_API_VERSION_1_3; // Pass in your value of VkApplicationInfo::apiVersion, otherwise will default to header version.
390391
init_info.Instance = g_Instance;
391392
init_info.PhysicalDevice = g_PhysicalDevice;
392393
init_info.Device = g_Device;

0 commit comments

Comments
 (0)