Instance Method


Creates a mesh by unifying vertex data from multiple sources with the specified parameters.


- (instancetype)initWithVertexBuffers:(NSArray<id<MDLMeshBuffer>> *)vertexBuffers vertexCount:(NSUInteger)vertexCount descriptor:(MDLVertexDescriptor *)descriptor submeshes:(NSArray<MDLSubmesh *> *)submeshes;



An array of objects, each of which provides a separate source of vertex information for the mesh.


The number of vertices in the mesh.


An object describing the type and layout of vertex attribute data in the vertex buffers.


An array of submesh objects, each of which provides index buffer and material information describing how some or all of the mesh’s vertex data is to be rendered.

Return Value

A new mesh object.


Use this initializer to create a mesh from vertex data that describes separate vertex attributes in separate arrays with matching indices (a structure of arrays).

See Also

Creating a Custom Mesh

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software