From 3e9a2e01da169007b6fc16492f812055645f6d5f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 21 Nov 2020 17:48:19 +0100 Subject: Pass vkGetInstanceProcAddr to puglCreateSurface instead of a loader This allows puglCreateSurface() to be used with some other loader, or when linking to Vulkan at compile time. --- bindings/cxx/include/pugl/vulkan.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bindings/cxx/include/pugl') diff --git a/bindings/cxx/include/pugl/vulkan.hpp b/bindings/cxx/include/pugl/vulkan.hpp index 5ce8acd..aaa221f 100644 --- a/bindings/cxx/include/pugl/vulkan.hpp +++ b/bindings/cxx/include/pugl/vulkan.hpp @@ -142,14 +142,14 @@ getInstanceExtensions() noexcept /// @copydoc puglCreateSurface inline VkResult -createSurface(const VulkanLoader& loader, +createSurface(PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr, View& view, VkInstance instance, const VkAllocationCallbacks* const allocator, VkSurfaceKHR* const surface) noexcept { const VkResult r = puglCreateSurface( - loader.cobj(), view.cobj(), instance, allocator, surface); + vkGetInstanceProcAddr, view.cobj(), instance, allocator, surface); return (!r && !surface) ? VK_ERROR_INITIALIZATION_FAILED : r; } -- cgit v1.2.1