---
title: MDLMeshBufferMap
framework: modelio
role: symbol
role_heading: Class
path: modelio/mdlmeshbuffermap
---

# MDLMeshBufferMap

An object that manages access to a memory buffer used for the data storage of a Model I/O mesh.

## Declaration

```swift
class MDLMeshBufferMap
```

## Overview

Overview Typically, you do not create MDLMeshBufferMap objects directly. Instead, you use classes supporting the MDLMeshBuffer protocol to manage mesh buffer memory shared with a rendering technology—for example, the MTKMeshBuffer class for rendering with Metal. A mesh buffer object vends a MDLMeshBufferMap objects when you use the map() method to gain temporary access to the shared memory. important: When you use a mesh buffer’s map() method, the buffer remains mapped for as long as that MDLMeshBufferMap object exists. Mapping a buffer may impose restrictions on a system. For example, a buffer in shared GPU memory may be unavailable for rendering while mapped, causing draw calls that use the buffer to fail until the corresponding MDLMeshBufferMap object is deallocated.

## Topics

### Creating a Buffer Map

- [init(bytes:deallocator:)](modelio/mdlmeshbuffermap/init(bytes:deallocator:).md)

### Accessing Buffer Data

- [bytes](modelio/mdlmeshbuffermap/bytes.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Managing Mesh Data

- [MDLMeshBuffer](modelio/mdlmeshbuffer.md)
- [MDLMeshBufferAllocator](modelio/mdlmeshbufferallocator.md)
- [MDLMeshBufferData](modelio/mdlmeshbufferdata.md)
- [MDLMeshBufferDataAllocator](modelio/mdlmeshbufferdataallocator.md)
- [MDLMeshBufferZone](modelio/mdlmeshbufferzone.md)
- [MDLMeshBufferZoneDefault](modelio/mdlmeshbufferzonedefault.md)
- [MDLVertexAttribute](modelio/mdlvertexattribute.md)
- [MDLVertexAttributeData](modelio/mdlvertexattributedata.md)
- [MDLVertexBufferLayout](modelio/mdlvertexbufferlayout.md)
- [MDLVertexDescriptor](modelio/mdlvertexdescriptor.md)
