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. --- examples/pugl_vulkan_demo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/pugl_vulkan_demo.c') diff --git a/examples/pugl_vulkan_demo.c b/examples/pugl_vulkan_demo.c index a65731b..3f684fe 100644 --- a/examples/pugl_vulkan_demo.c +++ b/examples/pugl_vulkan_demo.c @@ -1100,8 +1100,11 @@ main(int argc, char** argv) // Create Vulkan surface for Window PuglVulkanLoader* loader = puglNewVulkanLoader(app.world); - if (puglCreateSurface( - loader, app.view, vk->instance, ALLOC_VK, &vk->surface)) { + if (puglCreateSurface(puglGetInstanceProcAddrFunc(loader), + app.view, + vk->instance, + ALLOC_VK, + &vk->surface)) { return logError("Failed to create surface\n"); } -- cgit v1.2.1