From c80b9e68db2cd3629f25463985a74f50cb78488e Mon Sep 17 00:00:00 2001 From: Rune <13+rune@noreply.git.unicon-gmbh.de> Date: Mon, 20 Jul 2026 12:22:00 +0000 Subject: [PATCH] fix outdated loader example in README.md --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 71ba939..855c840 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,16 @@ This namespace contains metadata from the registry for: ### `Vulkan.Loader` This namespace contains a loader simlar to volk ```beef -VulkanLoader.Init(); // volkInitialize -result = vkCreateInstance(instanceCI, null, let instance); // c-style call +VulkanLoadedFunctions vulkanPfns = default; +vulkanPfns.Load(vkGetInstanceProcAddr); // get pfn from platform wrapper (SDL or glfw) +VulkanLoadedFunctions.current = &vulkanPfns; + +result = vkCreateInstance(instanceCI, null, let instance); CheckResult(result); -VulkanLoader.LoadInstance(instance); // volkLoadInstanceOnly -defer instance.Destroy(); // pretty call + +vulkanPfns.LoadInstance(instance); + +defer instance.Destroy(); // Vulkan-Hpp style call result = instance.EnumeratePhysicalDevices_Scope!(let physicalDevices); // get an array CheckResult(result);