An object that determines how attribute data is stored in memory and how it is mapped to the arguments of a vertex function.


class MTLVertexAttributeDescriptor : NSObject


A vertex attribute descriptor provides organization information so a vertex shader function can locate and load data into its arguments. The descriptor maps memory locations to attribute locations. It supports access to multiple attributes (such as vertex coordinates, surface normals, and texture coordinates) that are interleaved within the same buffer.


Organizing the Vertex Attribute

var format: MTLVertexFormat

The format of the vertex attribute.

var offset: Int

The location of an attribute in vertex data, determined by the byte offset from the start of the vertex data.

var bufferIndex: Int

The index in the argument table for the associated vertex buffer.


enum MTLVertexFormat

Values that specify the organization of function vertex data.


Inherits From

See Also

Vertex Data

Viewing Your Meshes with the Geometry Viewer

Find problems in your app's vertex function by pausing your app at any time, and viewing the current geometry from an angle you choose.

class MTLVertexDescriptor

An object that describes how vertex data is organized and mapped to a vertex function.

class MTLVertexAttribute

An object that represents an attribute of a vertex function.

class MTLVertexBufferLayoutDescriptor

An object that configures how vertex data and attributes are fetched by a vertex function.