map()
Provides direct, read-only access to the buffer’s contents.
Declaration
func map() -> MDLMeshBufferMapReturn Value
A data object mapped to the storage memory for the buffer.
Discussion
The buffer’s storage remains mapped for as long as the returned MDLMeshBufferMap object exists, potentially restricting other uses of that storage. For example, if a buffer’s storage is shared with GPU memory, that buffer may be unavailable for use in rendering until the MDLMeshBufferMap object is deallocated.