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


@interface MTLVertexDescriptor : NSObject


A MTLVertexDescriptor object 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 object. When you configure a MTLRenderPipelineDescriptor object to create this pipeline state, you use a MTLVertexDescriptor object to establish the vertex layout for the function associated with the pipeline. Create and configure a MTLVertexDescriptor object, then use this object to set the vertexDescriptor property of the MTLRenderPipelineDescriptor object.


Creating a New Vertex Descriptor

+ vertexDescriptor

Creates and returns a new vertex descriptor.

Setting Default Values

- reset

Resets the default state for the vertex descriptor.

Accessing the Vertex Buffer Layouts and Vertex 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.


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


Inherits From

Conforms To

See Also

Specifying Buffer Layouts and Fetch Behavior


The organization of vertex data in an attribute’s argument table.


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


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