Make C++20 modules work with the defaultDispatchLoaderDynamic. (#1651)

* Make C++20 modules work with the defaultDispatchLoaderDynamic.

* Add vulkan_hpp_macros.hpp to list of installed files.

* Adjust the text on module in the readme.

* Rename module from vulkan to vulkan_hpp

* Adjust some comments.

* Add a little disclaimer to vulkan.cppm.
This commit is contained in:
Andreas Süßenbach
2023-09-07 15:20:10 +02:00
committed by GitHub
parent a2e240c7e7
commit d4704cce01
25 changed files with 1084 additions and 834 deletions

View File

@@ -283,9 +283,7 @@ namespace vk
uint32_t apiVersion )
{
#if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 )
static vk::DynamicLoader dl;
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = dl.getProcAddress<PFN_vkGetInstanceProcAddr>( "vkGetInstanceProcAddr" );
VULKAN_HPP_DEFAULT_DISPATCHER.init( vkGetInstanceProcAddr );
VULKAN_HPP_DEFAULT_DISPATCHER.init();
#endif
vk::ApplicationInfo applicationInfo( appName.c_str(), 1, engineName.c_str(), 1, apiVersion );