---
title: "init(vertexBuffers:vertexCount:descriptor:submeshes:)"
framework: modelio
role: symbol
role_heading: Initializer
path: "modelio/mdlmesh/init(vertexbuffers:vertexcount:descriptor:submeshes:)"
---

# init(vertexBuffers:vertexCount:descriptor:submeshes:)

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

## Declaration

```swift
init(vertexBuffers: [any MDLMeshBuffer], vertexCount: Int, descriptor: MDLVertexDescriptor, submeshes: [MDLSubmesh])
```

## Parameters

- `vertexBuffers`: An array of objects, each of which provides a separate source of vertex information for the mesh.
- `vertexCount`: The number of vertices in the mesh.
- `descriptor`: An object describing the type and layout of vertex attribute data in the vertex buffers.
- `submeshes`: 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

Return Value A new mesh object.

## Discussion

Discussion 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

- [init(vertexBuffer:vertexCount:descriptor:submeshes:)](modelio/mdlmesh/init(vertexbuffer:vertexcount:descriptor:submeshes:).md)
- [init(bufferAllocator:)](modelio/mdlmesh/init(bufferallocator:).md)
- [newSubdividedMesh(_:submeshIndex:subdivisionLevels:)](modelio/mdlmesh/newsubdividedmesh(_:submeshindex:subdivisionlevels:).md)
- [init(meshBySubdividingMesh:submeshIndex:subdivisionLevels:allocator:)](modelio/mdlmesh/init(meshbysubdividingmesh:submeshindex:subdivisionlevels:allocator:).md)
