replaceVertices(at:commandBuffer:)
Retrieves a Metal vertex buffer for GPU replacement. The buffer’s contents are in an uninitialized state. The renderer waits for the command buffer to complete before using the buffer for rendering.
Declaration
final func replaceVertices(at index: Int, commandBuffer: (any MTLCommandBuffer)?) -> any MTLBufferParameters
- index:
The vertex buffer index to replace.
- commandBuffer:
The command buffer writing to this buffer, or
nilto skip synchronization.
Return Value
A MTLBuffer ready for GPU write operations.