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