<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMeshResource/readVertices(at:commandBuffer:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer20LowLevelMeshResourceC12readVertices2at13commandBufferSo9MTLBuffer_pSi_So010MTLCommandL0_pSgtF"
  },
  "title" : "readVertices(at:commandBuffer:)"
}
-->

# readVertices(at:commandBuffer:)

Returns a Metal buffer containing the current contents of the vertex buffer for GPU read operations.

```
final func readVertices(at index: Int, commandBuffer: (any MTLCommandBuffer)?) -> any MTLBuffer
```

## Parameters

`index`

The vertex buffer index to read.

`commandBuffer`

The command buffer that reads from this buffer, or `nil` to skip synchronization.

## Return Value

A `MTLBuffer` ready for GPU read operations.

## Discussion

The renderer waits for the provided command buffer to complete before discarding the buffer.

---

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)