FacticiusVir / SharpVk

C# Bindings for the Vulkan API & SPIR-V
MIT License
147 stars 18 forks source link

Naming inconsistencies #50

Open Y-Less opened 5 years ago

Y-Less commented 5 years ago

vkEnumerateDeviceExtensionProperties is in this library as PhysicalDevice.EnumerateDeviceExtensionProperties, duplicating the term Device. However, vkEnumerateInstanceExtensionProperties is Instance.EnumerateExtensionProperties, the second Instance has been dropped. Same for Enumerate(Thing)LayerProperties.

FacticiusVir commented 5 years ago

The distinction here comes from Physical Device =/= Device - the Instance enumerate method is used for getting Instance extensions to create Instance objects, all sat within the same type. The Physical Device enumerate is used to get (logical) Device extensions to create (logical) Device objects, that are a different type than that which contains the enumerate/create methods.