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`
|
### `Vulkan.Loader`
|
||||||
This namespace contains a loader simlar to volk
|
This namespace contains a loader simlar to volk
|
||||||
```beef
|
```beef
|
||||||
VulkanLoader.Init(); // volkInitialize
|
VulkanLoadedFunctions vulkanPfns = default;
|
||||||
result = vkCreateInstance(instanceCI, null, let instance); // c-style call
|
vulkanPfns.Load(vkGetInstanceProcAddr); // get pfn from platform wrapper (SDL or glfw)
|
||||||
|
VulkanLoadedFunctions.current = &vulkanPfns;
|
||||||
|
|
||||||
|
result = vkCreateInstance(instanceCI, null, let instance);
|
||||||
CheckResult(result);
|
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
|
result = instance.EnumeratePhysicalDevices_Scope!(let physicalDevices); // get an array
|
||||||
CheckResult(result);
|
CheckResult(result);
|
||||||
|
|||||||
Reference in New Issue
Block a user