Contents

replace(commandBuffer:)

Retrieves a Metal texture that shaders can write to on the GPU. The texture’s contents are in an uninitialized state. The renderer waits for the command buffer to complete before using the texture for rendering.

Declaration

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

Parameters

  • commandBuffer:

    The command buffer writing to this texture, or nil to skip synchronization.

Return Value

A MTLTexture ready for GPU write operations.

See Also

Reading and writing texture data