Class

MTLVertexAttribute

An object that represents an attribute of a vertex function.

Declaration

class 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

var name: String

The name of the attribute.

var attributeIndex: Int

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

var attributeType: MTLDataType

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

var isActive: Bool

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

var isPatchControlPointData: Bool

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

var isPatchData: Bool

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

Relationships

Inherits From

Conforms To

See Also

Retrieving Function Attributes

var vertexAttributes: [MTLVertexAttribute]?

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

Required.

var stageInputAttributes: [MTLAttribute]?

An array that describes the input attributes to the function.

Required.

class MTLAttribute

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