Contents

replace(using:)

Retrieve an MTLBuffer that can be used to replace the contents of the buffer on GPU using Metal.

Declaration

final func replace(using commandBuffer: any MTLCommandBuffer) -> any MTLBuffer

Discussion

The buffer’s contents are in an uninitialized state.

The caller supplies the MTLCommandBuffer that they intend to use for buffer modifications. RealityKit will wait for the MTLCommandBuffer to complete before utilizing the buffer for rendering.