<!--
{
  "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/MDLMeshBufferAllocator",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(pl)MDLMeshBufferAllocator"
  },
  "title" : "MDLMeshBufferAllocator"
}
-->

# MDLMeshBufferAllocator

The general interface for managing allocation of data buffers to be used in loading, processing, and rendering meshes.

```
protocol MDLMeshBufferAllocator : NSObjectProtocol
```

## Overview

Classes adopting this protocol provide different ways of handling mesh buffer data. For example, the <doc://com.apple.documentation/documentation/MetalKit/MTKMeshBufferAllocator> class can share mesh data with Metal buffers for use in rendering.

When you load meshes from a file with the [`MDLAsset`](/documentation/ModelIO/MDLAsset) class or generate meshes with the [`MDLMesh`](/documentation/ModelIO/MDLMesh) class, you must specify an allocator. By choosing an allocator specific to how you use a mesh, you can ensure that vertex and index data for the mesh is copied and transformed a minimal number of times between loading and use.

## Topics

### Allocating Mesh Buffers

[`-  newZone:`](/documentation/ModelIO/MDLMeshBufferAllocator/newZone(_:))

Creates a zone for related memory allocations.

[`-  newZoneForBuffersWithSize:andType:`](/documentation/ModelIO/MDLMeshBufferAllocator/newZoneForBuffers(withSize:andType:))

Creates a zone large enough to fit the specified group of allocation sizes.

[`-  newBuffer:type:`](/documentation/ModelIO/MDLMeshBufferAllocator/newBuffer(_:type:))

Creates a new buffer of the specified length.

[`-  newBufferFromZone:length:type:`](/documentation/ModelIO/MDLMeshBufferAllocator/newBuffer(from:length:type:))

Creates a new buffer of the specified length in the specified zone.

[`-  newBufferWithData:type:`](/documentation/ModelIO/MDLMeshBufferAllocator/newBuffer(with:type:))

Creates a new buffer containing the specified data.

[`-  newBufferFromZone:data:type:`](/documentation/ModelIO/MDLMeshBufferAllocator/newBuffer(from:data:type:))

Creates a new buffer containing the specified data in the specified zone.

## Relationships

### Inherits From

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

### Conforming Types

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

---

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)