replaceIndices(commandBuffer:)
Returns a Metal buffer you populate on the GPU with the new contents of the index buffer.
Declaration
final func replaceIndices(commandBuffer: (any MTLCommandBuffer)?) -> any MTLBufferParameters
- commandBuffer:
The command buffer that writes to this buffer, or
nilto skip synchronization.
Return Value
A MTLBuffer ready for GPU write operations.
Discussion
Upon return the buffer’s contents are undefined; the caller is responsible for populating it with valid data. The renderer waits for the provided command buffer to complete before using the buffer for rendering.