read(commandBuffer:)
Retrieves the Metal buffer for GPU reading.
Declaration
final func read(commandBuffer: (any MTLCommandBuffer)?) -> any MTLBufferParameters
- commandBuffer:
The command buffer using this buffer, or
nilto skip synchronization.
Return Value
The underlying MTLBuffer for reading.
Discussion
The renderer waits for the command buffer to complete before discarding the buffer.