Contents

readVertices(at:commandBuffer:)

Retrieves a Metal vertex buffer for GPU reading.

Declaration

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

Parameters

  • index:

    The vertex buffer index to retrieve.

  • commandBuffer:

    The command buffer using this buffer, or nil to skip synchronization.

Return Value

The underlying MTLBuffer for reading.

Discussion

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

See Also

Accessing vertex data