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

# MDLVertexBufferLayout

A [`MDLVertexBufferLayout`](/documentation/ModelIO/MDLVertexBufferLayout) object describes layout information for a vertex buffer in a [`MDLMesh`](/documentation/ModelIO/MDLMesh) object. A collection of vertex layer objects, vertex attribute objects, and additional information forms a [`MDLVertexDescriptor`](/documentation/ModelIO/MDLVertexDescriptor) object, which completely describes the layout of vertex buffers for a mesh.

```
class MDLVertexBufferLayout
```

## Overview

A collection of vertex layout objects, vertex attribute objects, and additional information forms a [`MDLVertexDescriptor`](/documentation/ModelIO/MDLVertexDescriptor) object, which completely describes the layout of vertex buffers for a [`MDLMesh`](/documentation/ModelIO/MDLMesh) object.

A mesh may store vertex data in either a structure of arrays model, where data for each vertex attribute (such as vertex position or surface normal) lies in a separate vertex buffer, or in an array of structures model, where multiple vertex attributes share the same buffer.

- In a structure of arrays, the mesh’s [`vertexBuffers`](/documentation/ModelIO/MDLMesh/vertexBuffers) array contains several [`MDLMeshBuffer`](/documentation/ModelIO/MDLMeshBuffer) objects, and the mesh’s [`vertexDescriptor`](/documentation/ModelIO/MDLMesh/vertexDescriptor) object contains a separate [`MDLVertexBufferLayout`](/documentation/ModelIO/MDLVertexBufferLayout) object for each buffer.
- In an array of structures, the mesh contains a single vertex buffer, and its descriptor contains a single vertex buffer layout object. To identify which bytes in the buffer refer to which vertices and vertex attributes, use the layout’s [`stride`](/documentation/ModelIO/MDLVertexBufferLayout/stride) together with the [`format`](/documentation/ModelIO/MDLVertexAttribute/format) and [`offset`](/documentation/ModelIO/MDLVertexAttribute/offset) properties of the descriptor’s vertex attributes.

Because there is only one stride per buffer:

- If a buffer uses interleaved layout, it can contain attributes of different sizes, and the stride is the sum of their sizes (plus padding).
- If a buffer uses non-interleaved layout (that is, it stores all the data for one attribute, then all the data for another, and so on), each attribute in the buffer must have the same size as the others.

## Topics

### Working with Layout Information

[`stride`](/documentation/ModelIO/MDLVertexBufferLayout/stride)

The stride, in bytes, between data for separate vertices in a vertex buffer.

## Relationships

### Conforms To

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

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

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

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

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

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

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