<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMesh/read(bufferIndex:using:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12LowLevelMeshC4read11bufferIndex5usingSo9MTLBuffer_pSi_So16MTLCommandBuffer_ptF"
  },
  "title" : "read(bufferIndex:using:)"
}
-->

# read(bufferIndex:using:)

Retrieves a Metal vertex buffer at the specified index, for GPU reading.

```
@MainActor func read(bufferIndex index: Int, using commandBuffer: any MTLCommandBuffer) -> any MTLBuffer
```

## Parameters

`index`

The index of the buffer to read.
Use a value that is less than [`vertexBufferCount`](/documentation/RealityKit/LowLevelMesh/Descriptor-swift.struct/vertexBufferCount).

`commandBuffer`

The <doc://com.apple.documentation/documentation/Metal/MTLCommandBuffer> you intend
to use for reading.
RealityKit waits for the 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)