drawPrimitives(_:vertexStart:vertexCount:instanceCount:baseInstance:)
Encodes a command to render a number of instances of primitives using vertex data in contiguous array elements, starting from the base instance.
Declaration
func drawPrimitives(_ primitiveType: MTLPrimitiveType, vertexStart: Int, vertexCount: Int, instanceCount: Int, baseInstance: Int)Parameters
- primitiveType:
The type of primitives that the vertices are assembled into.
- vertexStart:
The first vertex to draw.
- vertexCount:
The number of vertices to draw.
- instanceCount:
The number of instances to draw.
- baseInstance:
The first instance to draw.
Discussion
The command generated by this method is equivalent to calling drawPrimitives(_:vertexStart:vertexCount:instanceCount:baseInstance:).
See Also
Encoding a drawing command
drawIndexedPrimitives(_:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:)drawPatches(_:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:)drawIndexedPatches(_:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:tessellationFactorBuffer:tessellationFactorBufferOffset:tessellationFactorBufferInstanceStride:)