fix outdated loader example in README.md
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user