<!--
{
  "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/MDLVertexAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLVertexAttribute"
  },
  "title" : "MDLVertexAttribute"
}
-->

# MDLVertexAttribute

A description of the format of per-vertex data for a single vertex attribute in a mesh object.

```
class MDLVertexAttribute
```

## Overview

The vertex buffers of a [`MDLMesh`](/documentation/ModelIO/MDLMesh) object store vertex attributes—such as vertex position, surface normal vector, or texture coordinates—that define its 3D shape and other data for use in rendering. Attribute information describes the structure and layout of that data. A collection of vertex attribute objects and additional information forms a [`MDLVertexDescriptor`](/documentation/ModelIO/MDLVertexDescriptor) object, which completely describes the layout of vertex buffers for a mesh.

## Topics

### Creating a Vertex Attribute

[`-  initWithName:format:offset:bufferIndex:`](/documentation/ModelIO/MDLVertexAttribute/init(name:format:offset:bufferIndex:))

Initializes a vertex attribute object with the specified property values.

### Inspecting a Vertex Attribute

[`name`](/documentation/ModelIO/MDLVertexAttribute/name)

An identifier for the semantic use of the vertex attribute.

[`format`](/documentation/ModelIO/MDLVertexAttribute/format)

The format of per-vertex data for the attribute.

[`offset`](/documentation/ModelIO/MDLVertexAttribute/offset)

The offset, in bytes, of vertex data for the attribute in a vertex buffer, relative to the start of data for each vertex.

[`bufferIndex`](/documentation/ModelIO/MDLVertexAttribute/bufferIndex)

The index of the vertex buffer containing data for this attribute in a mesh’s [`vertexBuffers`](/documentation/ModelIO/MDLMesh/vertexBuffers) array.

[`initializationValue`](/documentation/ModelIO/MDLVertexAttribute/initializationValue)

The default value for vertex data for this attribute.

### Constants

[Vertex Attributes](/documentation/ModelIO/vertex-attributes)

Names that identify semantic uses for vertex attribute data, used by the [`name`](/documentation/ModelIO/MDLVertexAttribute/name) property.

[`MDLVertexFormat`](/documentation/ModelIO/MDLVertexFormat)

Descriptions of the data size and layout for a vertex attribute, used by the [`format`](/documentation/ModelIO/MDLVertexAttribute/format) property.

## Relationships

### Conforms To

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

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

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

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

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

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

[`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)