---
title: MDLMeshBuffer
framework: modelio
role: symbol
role_heading: Protocol
path: modelio/mdlmeshbuffer
---

# MDLMeshBuffer

The general interface for managing storage of vertex and index data used in loading, processing, and rendering meshes.

## Declaration

```swift
protocol MDLMeshBuffer : NSCopying, NSObjectProtocol
```

## Overview

Overview Model I/O creates buffers using an allocator that you specify when loading mesh data from a file with the MDLAsset class or generating meshes with the MDLMesh class. You can also create buffers using an allocator method such as newBuffer(with:type:). The allocator you choose determines the concrete class of a mesh buffer and thus its storage mechanism—for example, the MetalKit MTKMeshBufferAllocator class allocates MTKMeshBuffer objects, which share storage with Metal buffers for use in rendering.

## Topics

### Working with Data in a Buffer

- [fill(_:offset:)](modelio/mdlmeshbuffer/fill(_:offset:).md)
- [map()](modelio/mdlmeshbuffer/map().md)
- [length](modelio/mdlmeshbuffer/length.md)

### Inspecting a Buffer

- [allocator](modelio/mdlmeshbuffer/allocator.md)
- [zone](modelio/mdlmeshbuffer/zone.md)
- [type](modelio/mdlmeshbuffer/type.md)

### Constants

- [MDLMeshBufferType](modelio/mdlmeshbuffertype.md)

## Relationships

### Inherits From

- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

### Conforming Types

- [MDLMeshBufferData](modelio/mdlmeshbufferdata.md)

## See Also

### Managing Mesh Data

- [MDLMeshBufferAllocator](modelio/mdlmeshbufferallocator.md)
- [MDLMeshBufferData](modelio/mdlmeshbufferdata.md)
- [MDLMeshBufferDataAllocator](modelio/mdlmeshbufferdataallocator.md)
- [MDLMeshBufferMap](modelio/mdlmeshbuffermap.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)
