vkCmdDraw
vkCmdDraw is a Vulkan command that is used to issue draw calls. Draw calls are instructions to the GPU to render geometry. The vkCmdDraw command specifies the number of vertices to draw and the starting vertex. It is typically used in conjunction with other Vulkan commands, such as vkCmdBindPipeline and vkCmdBindDescriptorSets, to set up the rendering state before issuing the draw call. The command requires a VkCommandBuffer to be valid and in the recording state. It is important to note that vkCmdDraw can only be used in the primary command buffer. If you need to issue draw calls from a secondary command buffer, you would use vkCmdExecuteCommands to execute the secondary command buffer, which in turn can contain its own draw calls. The parameters for vkCmdDraw include vertexCount, instanceCount, firstVertex, and firstInstance. These parameters allow for drawing multiple instances of the same geometry and specifying the starting point of the vertex data. Proper use of vkCmdDraw is fundamental for rendering any visual elements within a Vulkan application.