Encodes a command to render a number of instances of primitives using an index list specified in a buffer, starting from the base vertex of the base instance.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
The type of primitive that the vertices are assembled into.
For each instance, the number of indices to read from the index buffer.
The data type of the indices.
A buffer that contains indices to vertices.
Byte offset within
indexto start reading indices from.
The number of instances to draw.
The first vertex to draw.
The first instance to draw.
Primitive restart functionality is enabled with the largest unsigned integer index value, relative to
index (0xFFFF for
MTLIndex or 0xFFFFFFFF for
MTLIndex). This feature finishes drawing the current primitive at the specified index and starts drawing a new one with the next index.
index must be aligned to 4 bytes.
When a draw command is encoded, any necessary references to rendering state or resources previously set on the encoder are recorded as part of the command. After encoding a command, you can safely change the encoding state to set up parameters needed to encode other commands.