Encodes a command to render a number of instances of primitives using vertex data in contiguous array elements.
- iOS 8.0+
- macOS 10.11+
- tvOS 9.0+
The type of primitives that the vertices are assembled into.
The first vertex to draw.
The number of vertices to draw.
The number of instances to draw.
An instance starts with the first vertex at the array element with index
vertex and ends at the array element with index
vertex. The value of
instance determines the number of instances to draw.
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.