Contents

replace(bufferIndex:using:)

Retrieves a Metal vertex buffer you can use to replace the contents of the specified buffer on the GPU using Metal.

Declaration

@MainActor func replace(bufferIndex index: Int, using commandBuffer: any MTLCommandBuffer) -> any MTLBuffer

Parameters

  • index:

    The index of the buffer to modify. Use a value that is less than Vertexbuffercount.

  • commandBuffer:

    The Mtlcommandbuffer you intend to use for buffer modifications. RealityKit waits for the command buffer to complete before utilizing the buffer for rendering.

Discussion

The buffer’s contents are in an uninitialized state.

See Also

Accessing mesh data on the GPU with Metal