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


class 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.


Setting Default Values

func reset()

Resets the default state for the vertex descriptor.

Accessing the Vertex Buffer Layouts and Vertex Attributes

var attributes: MTLVertexAttributeDescriptorArray

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.

var layouts: MTLVertexBufferLayoutDescriptorArray

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


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 MTLVertexAttribute

An object that represents an attribute of a vertex function.

class MTLVertexAttributeDescriptor

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

class MTLVertexBufferLayoutDescriptor

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