Class

MTLVertexAttribute

An object that represents an attribute of a vertex function.

Declaration

@interface MTLVertexAttribute : NSObject

Overview

A MTLVertexAttribute object represents an attribute for per-vertex input in a vertex function. You use vertex attribute objects to inspect the inputs of a vertex function by examining the vertexAttributes property of the corresponding MTLFunction object.

Topics

Describing the Attribute

name

The name of the attribute.

attributeIndex

The index of the attribute, as declared in Metal shader source code.

attributeType

The data type for the attribute, as declared in Metal shader source code.

active

A Boolean value that indicates whether this vertex attribute is active.

patchControlPointData

A Boolean value that indicates whether this vertex attribute represents control point data.

patchData

A Boolean value that indicates whether this vertex attribute represents patch data.

Relationships

Inherits From

See Also

Retrieving Function Attributes

vertexAttributes

An array that describes the vertex input attributes to a vertex function.

Required.

stageInputAttributes

An array that describes the input attributes to the function.

Required.

MTLAttribute

An object that describes an attribute defined in the stage-in argument for a shader.