mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Add DispatchLoaderDynamic constructor for use with linked vulkan library. (#300)
This commit is contained in:
parent
e935e6291e
commit
70c837fba2
@ -2444,11 +2444,25 @@ void VulkanHppGenerator::writeDispatchLoaderDynamic(std::ostream &os)
|
|||||||
public:
|
public:
|
||||||
DispatchLoaderDynamic() = default;
|
DispatchLoaderDynamic() = default;
|
||||||
|
|
||||||
|
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||||
|
DispatchLoaderDynamic(vk::Instance const& instance, vk::Device const& device = {})
|
||||||
|
{
|
||||||
|
init(instance, device);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||||
|
void init(vk::Instance const& instance, vk::Device const& device = {})
|
||||||
|
{
|
||||||
|
init(instance, ::vkGetInstanceProcAddr, device, device ? ::vkGetDeviceProcAddr : nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This interface does not require a linked vulkan library.
|
||||||
DispatchLoaderDynamic( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
DispatchLoaderDynamic( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
||||||
{
|
{
|
||||||
init( instance, getInstanceProcAddr, device, getDeviceProcAddr );
|
init( instance, getInstanceProcAddr, device, getDeviceProcAddr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This interface does not require a linked vulkan library.
|
||||||
void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
||||||
{
|
{
|
||||||
assert(instance && getInstanceProcAddr);
|
assert(instance && getInstanceProcAddr);
|
||||||
|
@ -54998,11 +54998,25 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
public:
|
public:
|
||||||
DispatchLoaderDynamic() = default;
|
DispatchLoaderDynamic() = default;
|
||||||
|
|
||||||
|
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||||
|
DispatchLoaderDynamic(vk::Instance const& instance, vk::Device const& device = {})
|
||||||
|
{
|
||||||
|
init(instance, device);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This interface is designed to be used for per-device function pointers in combination with a linked vulkan library.
|
||||||
|
void init(vk::Instance const& instance, vk::Device const& device = {})
|
||||||
|
{
|
||||||
|
init(instance, ::vkGetInstanceProcAddr, device, device ? ::vkGetDeviceProcAddr : nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This interface does not require a linked vulkan library.
|
||||||
DispatchLoaderDynamic( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
DispatchLoaderDynamic( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
||||||
{
|
{
|
||||||
init( instance, getInstanceProcAddr, device, getDeviceProcAddr );
|
init( instance, getInstanceProcAddr, device, getDeviceProcAddr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This interface does not require a linked vulkan library.
|
||||||
void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = VK_NULL_HANDLE, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr )
|
||||||
{
|
{
|
||||||
assert(instance && getInstanceProcAddr);
|
assert(instance && getInstanceProcAddr);
|
||||||
|
Loading…
Reference in New Issue
Block a user