<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLMeshBufferData",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLMeshBufferData"
  },
  "title" : "MDLMeshBufferData"
}
-->

# MDLMeshBufferData

A memory buffer that stores vertex or index data for a Model I/O mesh.

```
class MDLMeshBufferData
```

## Overview

This class is the simplest concrete implementation of the [`MDLMeshBuffer`](/documentation/ModelIO/MDLMeshBuffer) protocol—use this class when you need only a single data store for loading or processing mesh data. To share mesh data for other uses, use another concrete implementation of the [`MDLMeshBuffer`](/documentation/ModelIO/MDLMeshBuffer) protocol—for example, the <doc://com.apple.documentation/documentation/MetalKit/MTKMeshBuffer> class shares mesh data with Metal buffers, ensuring that data is copied a minimal number of times between loading, processing, and rendering.If you do not specify a [`MDLMeshBufferAllocator`](/documentation/ModelIO/MDLMeshBufferAllocator) object for loading meshes from a file with the [`MDLAsset`](/documentation/ModelIO/MDLAsset) class or generating meshes with the [`MDLMesh`](/documentation/ModelIO/MDLMesh) class, Model I/O uses [`MDLMeshBufferData`](/documentation/ModelIO/MDLMeshBufferData) objects to store mesh data.

## Topics

### Creating a Buffer

[`-  initWithType:data:`](/documentation/ModelIO/MDLMeshBufferData/init(type:data:))

Initializes a buffer containing the specified data.

[`-  initWithType:length:`](/documentation/ModelIO/MDLMeshBufferData/init(type:length:))

Initializes a buffer of the specified length.

### Accessing a Buffer’s Data

[`data`](/documentation/ModelIO/MDLMeshBufferData/data)

The underlying data storage for the mesh buffer.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`MDLMeshBuffer`](/documentation/ModelIO/MDLMeshBuffer)

[`Equatable`](/documentation/Swift/Equatable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)