You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use vulkan.hpp in an application that already uses volk.h for function loading.
By including volk.h, but then undefining VK_NO_PROTOTYPES, I can make the vulkan.hpp static loader be defined and used by default, and consume the volk function pointers. Doing it this way feels wrong, as I still want vulkan.h to not define prototypes if it's included again.
I'm not sure exactly what define should trigger the definition of the static loader, but my suggestion would be #if !defined( VK_NO_PROTOTYPES ) || (defined(VULKAN_HPP_DISPATCH_LOADER_DYNAMIC) && VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 0).
Currently VK_NO_PROTOTYPES being defined and VULKAN_HPP_DISPATCH_LOADER_DYNAMIC being defined to 0 results in a header that fails to compile as vk::DispatchLoaderStatic is referenced but not defined.
The text was updated successfully, but these errors were encountered:
I was trying to use vulkan.hpp in an application that already uses volk.h for function loading.
By including volk.h, but then undefining VK_NO_PROTOTYPES, I can make the vulkan.hpp static loader be defined and used by default, and consume the volk function pointers. Doing it this way feels wrong, as I still want vulkan.h to not define prototypes if it's included again.
I'm not sure exactly what define should trigger the definition of the static loader, but my suggestion would be
#if !defined( VK_NO_PROTOTYPES ) || (defined(VULKAN_HPP_DISPATCH_LOADER_DYNAMIC) && VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 0)
.Currently VK_NO_PROTOTYPES being defined and VULKAN_HPP_DISPATCH_LOADER_DYNAMIC being defined to 0 results in a header that fails to compile as vk::DispatchLoaderStatic is referenced but not defined.
The text was updated successfully, but these errors were encountered: