---
title: bufferIndex
framework: modelio
role: symbol
role_heading: Instance Property
path: modelio/mdlvertexattribute/bufferindex
---

# bufferIndex

The index of the vertex buffer containing data for this attribute in a mesh’s vertexBuffers array.

## Declaration

```swift
var bufferIndex: Int { get set }
```

## Discussion

Discussion A mesh may store vertex data in either a structure of arrays model, where data for each attribute lies in a separate vertex buffer, or in an array of structures model. In the latter, multiple vertex attributes share the same buffer (and thus have the same bufferIndex value), and the format and offset values (together with the stride value of a related MDLVertexBufferLayout object) identify which bytes in that buffer refer to which vertex attributes.

## See Also

### Inspecting a Vertex Attribute

- [name](modelio/mdlvertexattribute/name.md)
- [format](modelio/mdlvertexattribute/format.md)
- [offset](modelio/mdlvertexattribute/offset.md)
- [initializationValue](modelio/mdlvertexattribute/initializationvalue.md)
