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

# MTLVertexDescriptor

An instance that describes how to organize and map data to a vertex function.

```
class MTLVertexDescriptor
```

## Overview

An [`MTLVertexDescriptor`](/documentation/Metal/MTLVertexDescriptor) instance is used to configure how vertex data stored in memory is mapped to attributes in a vertex shader.

A pipeline state is the state of the graphics rendering pipeline, including shaders, blending, multisampling, and visibility testing. For every pipeline state, there can be only one [`MTLVertexDescriptor`](/documentation/Metal/MTLVertexDescriptor) instance. When you configure an [`MTLRenderPipelineDescriptor`](/documentation/Metal/MTLRenderPipelineDescriptor) instance to create this pipeline state, you use an [`MTLVertexDescriptor`](/documentation/Metal/MTLVertexDescriptor) instance to establish the vertex layout for the function associated with the pipeline. Create and configure an [`MTLVertexDescriptor`](/documentation/Metal/MTLVertexDescriptor) instance, then use this instance to set the [`vertexDescriptor`](/documentation/Metal/MTLRenderPipelineDescriptor/vertexDescriptor) property of the [`MTLRenderPipelineDescriptor`](/documentation/Metal/MTLRenderPipelineDescriptor) instance.

## Topics

### Creating a new vertex descriptor

[`vertexDescriptor`](/documentation/Metal/MTLVertexDescriptor/vertexDescriptor)

Creates and returns a new vertex descriptor.

### Setting default values

[`reset()`](/documentation/Metal/MTLVertexDescriptor/reset())

Resets the default state for the vertex descriptor.

### Accessing the vertex buffer layouts and vertex attributes

[`attributes`](/documentation/Metal/MTLVertexDescriptor/attributes)

An array of state data that describes how vertex attribute data is stored in memory and is mapped to arguments for a vertex shader function.

[`layouts`](/documentation/Metal/MTLVertexDescriptor/layouts)

An array of state data that describes how data are fetched by a vertex shader function when rendering primitives.



---

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)