Contents

read(commandBuffer:)

Retrieves the Metal texture for GPU reading.

Declaration

final func read(commandBuffer: (any MTLCommandBuffer)?) -> any MTLTexture

Parameters

  • commandBuffer:

    The command buffer using this texture, or nil to 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.

See Also

Reading and writing texture data