vulkan-go / vulkan

Vulkan API bindings for Go programming language
MIT License
742 stars 55 forks source link

Should AllocateDescriptorSets take []DescriptorSet rather than *DescriptorSet? #35

Open Noofbiz opened 5 years ago

Noofbiz commented 5 years ago

Like how CommandBuffers or other ones that have plural names, they generally take a slice rather than a pointer. It's possible to do it this way in Vulkan in C++ as follows

std::vector<VkDescriptorSet> descriptorSets;
vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data());
xlab commented 5 years ago

Yes, in most cases the difference between a reference and an array is not clear to the automated conveter. So it must be specified in the manifest — https://github.com/vulkan-go/vulkan/blob/master/vulkan.yml

celer commented 4 years ago

+1