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


@interface MDLMeshBufferData : NSObject


This class is the simplest concrete implementation of the 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 protocol—for example, the 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 object for loading meshes from a file with the MDLAsset class or generating meshes with the MDLMesh class, Model I/O uses MDLMeshBufferData objects to store mesh data.


Creating a Buffer

- initWithType:data:

Initializes a buffer containing the specified data.

- initWithType:length:

Initializes a buffer of the specified length.

Accessing a Buffer’s Data


The underlying data storage for the mesh buffer.


Inherits From

Conforms To

See Also

Managing Mesh Data


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


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


A basic allocator implementation that allocates from main memory using data objects.


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


The general interface for logical pools of memory used in allocation of related mesh data buffers.


A standard implementation of the MDLMeshBufferZone protocol.


A description of the format of per-vertex data for a single vertex attribute in a mesh object.


An object that provides convenience access to vertex data for a specific vertex attribute of a mesh.


A MDLVertexBufferLayout object describes layout information for a vertex buffer in a MDLMesh object. A collection of vertex layer objects, vertex attribute objects, and additional information forms a MDLVertexDescriptor object, which completely describes the layout of vertex buffers for a mesh.


A description of the structure, format, and layout for vertex data buffers associated with a mesh.