Let’s look at the vulkan.hpp-headers, and consider the method
vk::CommandBuffer::drawIndexed as an example. Clearly this method changes the state of the command-buffer that is referenced by by the VkCommandBuffer handle. Has anyone got some insight as to what was the rationale behind making such a method const?
Also, since VkHandles are passed around by value, having a construct such as for example
void onlyReadXY(VkPhysicalDevice const physical_device) makes no sense since one can just copy away the constness.
Is there any way I can separate vulkan-functions that only read internal data from functions that also modify internal data, or does the api make no promises there?
To the last question, would not the aforementioned method from the vulkan.hpp have to make everything non-const in that case?
I know that these are technically multiple questions, however I think they are all related, and the answer to one may imply the answer to the other.
Thanks in advance for any insight, or references.