<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLVertexDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLVertexDescriptor"
  },
  "title" : "MDLVertexDescriptor"
}
-->

# MDLVertexDescriptor

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

```
class MDLVertexDescriptor
```

## Overview

A [`MDLMesh`](/documentation/ModelIO/MDLMesh) object contains arrays of data for separate attributes of each vertex, such as position, color, surface normal vector, or texture coordinates. The vertex data for various attributes can be contained in one or more buffers and may be laid out in various contiguous or interleaved formats. You use a mesh’s [`vertexDescriptor`](/documentation/ModelIO/MDLMesh/vertexDescriptor) property to determine the structure of vertex data for a mesh loaded from an asset file for use in rendering or processing a mesh. You also use vertex descriptors to describe the structure of existing vertex data when creating a new mesh.

## Topics

### Working with Vertex Attributes

[`attributes`](/documentation/ModelIO/MDLVertexDescriptor/attributes)

The list of vertex attributes described by the vertex descriptor.

[`-  attributeNamed:`](/documentation/ModelIO/MDLVertexDescriptor/attributeNamed(_:))

Returns the vertex attribute with the specified name in the vertex descriptor.

[`-  addOrReplaceAttribute:`](/documentation/ModelIO/MDLVertexDescriptor/addOrReplaceAttribute(_:))

Adds the specified vertex attribute to the vertex descriptor, replacing any existing attribute with the same name.

[`-  setPackedOffsets`](/documentation/ModelIO/MDLVertexDescriptor/setPackedOffsets())

Sets the offset for each vertex attribute to the minimum value to pack vertex data together in a single buffer.

### Working with Vertex Buffer Layouts

[`layouts`](/documentation/ModelIO/MDLVertexDescriptor/layouts)

The list of vertex buffer layouts described by the vertex descriptor.

[`-  setPackedStrides`](/documentation/ModelIO/MDLVertexDescriptor/setPackedStrides())

Sets the stride for each vertex layout to the minimum value to pack vertex data together in a single buffer.

### Resetting a Vertex Descriptor

[`-  reset`](/documentation/ModelIO/MDLVertexDescriptor/reset())

Resets a vertex descriptor to its default state.

### Copying a Vertex Descriptor

[`-  initWithVertexDescriptor:`](/documentation/ModelIO/MDLVertexDescriptor/init(vertexDescriptor:))

Creates a new vertex descriptor by performing a deep copy of the specified vertex descriptor.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)