<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLIndirectRenderCommand/drawPrimitives(_:vertexStart:vertexCount:instanceCount:baseInstance:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLIndirectRenderCommand(im)drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance:"
  },
  "title" : "drawPrimitives(_:vertexStart:vertexCount:instanceCount:baseInstance:)"
}
-->

# 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.

```
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:)`](/documentation/Metal/MTLIndirectRenderCommand/drawPrimitives(_:vertexStart:vertexCount:instanceCount:baseInstance:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)