withUnsafeMutableBytes(bufferIndex:_:)
Updates a Metal vertex buffer synchronously on the CPU.
Declaration
@MainActor func withUnsafeMutableBytes(bufferIndex: Int, _ callback: (UnsafeMutableRawBufferPointer) -> Void)Discussion
The buffer is only valid for the lifetime of the callback.