C Specification
To bind vertex buffers to a command buffer for use in subsequent drawing commands, call:
// Provided by VK_VERSION_1_0
void vkCmdBindVertexBuffers(
VkCommandBuffer commandBuffer,
uint32_t firstBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
const VkDeviceSize* pOffsets);
Parameters
-
commandBuffer
is the command buffer into which the command is recorded. -
firstBinding
is the index of the first vertex input binding whose state is updated by the command. -
bindingCount
is the number of vertex input bindings whose state is updated by the command. -
pBuffers
is a pointer to an array of buffer handles. -
pOffsets
is a pointer to an array of buffer offsets.
Description
The values taken from elements i of pBuffers
and pOffsets
replace the current state for the vertex input binding
firstBinding
+ i, for i in [0,
bindingCount
).
The vertex input binding is updated to start at the offset indicated by
pOffsets
[i] from the start of the buffer pBuffers
[i].
All vertex input attributes that use each of these bindings will use these
updated addresses in their address calculations for subsequent drawing
commands.
If the nullDescriptor
feature is enabled,
elements of pBuffers
can be VK_NULL_HANDLE, and can be used by
the vertex shader.
If a vertex input attribute is bound to a vertex input binding that is
VK_NULL_HANDLE, the values taken from memory are considered to be
zero, and missing G, B, or A components are
filled with (0,0,1).
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.