<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMeshResource/Descriptor-swift.struct/init(vertexCapacity:vertexAttributes:vertexLayouts:indexCapacity:indexType:instanceCapacity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer20LowLevelMeshResourceC10DescriptorV14vertexCapacity0I10Attributes0I7Layouts05indexJ00M4Type08instanceJ0AESi_SayAC9AttributeVGSayAC6LayoutVGSiSo08MTLIndexN0VSitcfc"
  },
  "title" : "init(vertexCapacity:vertexAttributes:vertexLayouts:indexCapacity:indexType:instanceCapacity:)"
}
-->

# init(vertexCapacity:vertexAttributes:vertexLayouts:indexCapacity:indexType:instanceCapacity:)

Creates a mesh descriptor with the given vertex capacity, attributes, layouts, index
capacity, index type, and instance capacity.

```
init(vertexCapacity: Int = 0, vertexAttributes: [LowLevelMeshResource.Attribute] = [Attribute](), vertexLayouts: [LowLevelMeshResource.Layout] = [Layout](), indexCapacity: Int = 0, indexType: MTLIndexType = MTLIndexType.uint32, instanceCapacity: Int = 0)
```

## Parameters

`vertexCapacity`

The maximum number of vertices to allocate space for. Defaults to `0`.

`vertexAttributes`

The vertex input attributes. Defaults to `[]`.

`vertexLayouts`

The vertex buffer layouts. Defaults to `[]`.

`indexCapacity`

The maximum number of indices to allocate space for. Defaults to `0`.

`indexType`

The data type of the values stored in the index buffer. Defaults to `.uint32`.

`instanceCapacity`

The maximum number of instances for per-instance vertex data. Defaults to `0`.

---

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)