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