Contents

read(bufferIndex:using:)

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

Declaration

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

  • commandBuffer:

    The Mtlcommandbuffer you intend to use for reading. RealityKit waits for the command buffer to complete before discarding the buffer.

See Also

Accessing mesh data on the GPU with Metal