diff --git a/src/core/renderer_vk/renderer_vk.cpp b/src/core/renderer_vk/renderer_vk.cpp index d05a070f..14bde2c8 100644 --- a/src/core/renderer_vk/renderer_vk.cpp +++ b/src/core/renderer_vk/renderer_vk.cpp @@ -885,10 +885,17 @@ void RendererVK::display() { } } +// DynamicLoader is in a different namespace in different versions of Vulkan-Hpp +#if VK_HEADER_VERSION >= 301 +using VulkanDynamicLoader = vk::detail::DynamicLoader +#else +using VulkanDynamicLoader = vk::DynamicLoader; +#endif + void RendererVK::initGraphicsContext(SDL_Window* window) { targetWindow = window; // Resolve all instance function pointers - static vk::DynamicLoader dl; + static VulkanDynamicLoader dl; VULKAN_HPP_DEFAULT_DISPATCHER.init(dl.getProcAddress("vkGetInstanceProcAddr")); // Create Instance @@ -1588,4 +1595,4 @@ void RendererVK::deinitGraphicsContext() { // TODO: Make it so that depth and colour buffers get written back to 3DS memory printf("RendererVK::DeinitGraphicsContext called\n"); -} \ No newline at end of file +}