Class

MTLVertexDescriptor

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

Declaration

@interface MTLVertexDescriptor : NSObject

Overview

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.

Topics

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

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.

layouts

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

Relationships

Inherits From

Conforms To

See Also

Specifying Buffer Layouts and Fetch Behavior

vertexDescriptor

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

MTLVertexAttributeDescriptor

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

MTLVertexBufferLayoutDescriptor

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