Contents

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