---
title: bufferAllocator
framework: modelio
role: symbol
role_heading: Instance Property
path: modelio/mdlasset/bufferallocator
---

# bufferAllocator

An object responsible for allocating mesh vertex data loaded from the asset.

## Declaration

```swift
var bufferAllocator: any MDLMeshBufferAllocator { get }
```

## Discussion

Discussion You specify an allocator when loading an asset with the init(url:vertexDescriptor:bufferAllocator:) initializer. If you do not specify an allocator, or import an asset through other means, the MDLAsset class uses an internal allocator object. For example, to use the MetalKit framework for loading vertex data into GPU buffers for rendering with Metal, pass a MTKMeshBufferAllocator object for the bufferAllocator parameter. By specifying an allocator, you ensure that mesh data is copied a minimal number of times between being read from a file and being loaded into GPU memory for rendering.

## See Also

### Working with Asset Content

- [object(at:)](modelio/mdlasset/object(at:).md)
- [subscript(_:)](modelio/mdlasset/subscript(_:).md)
- [count](modelio/mdlasset/count.md)
- [childObjects(of:)](modelio/mdlasset/childobjects(of:).md)
- [add(_:)](modelio/mdlasset/add(_:).md)
- [remove(_:)](modelio/mdlasset/remove(_:).md)
- [boundingBox](modelio/mdlasset/boundingbox.md)
- [boundingBox(atTime:)](modelio/mdlasset/boundingbox(attime:).md)
- [url](modelio/mdlasset/url.md)
- [vertexDescriptor](modelio/mdlasset/vertexdescriptor.md)
- [masters](modelio/mdlasset/masters.md)
