Change (most of) the samples to use the DispatchLoaderDynamic by default. (#392)
This commit is contained in:
committed by
Markus Tavenrath
parent
5ceb4d2801
commit
becef43315
@@ -41,6 +41,13 @@ int main(int /*argc*/, char ** /*argv*/)
|
||||
desiredVersionString += ".";
|
||||
desiredVersionString += std::to_string(desiredMinorVersion);
|
||||
|
||||
#if (VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1)
|
||||
// initialize the DipatchLoaderDynamic to use
|
||||
static vk::DynamicLoader dl;
|
||||
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = dl.getProcAddress<PFN_vkGetInstanceProcAddr>("vkGetInstanceProcAddr");
|
||||
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
|
||||
#endif
|
||||
|
||||
// Determine what API version is available
|
||||
uint32_t apiVersion = vk::enumerateInstanceVersion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user