Encodes a command to render one instance of primitives using an index list specified in a buffer.
- iOS 8.0+
- macOS 10.11+
- tvOS 9.0+
- Mac Catalyst 13.0+Beta
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.
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.