Class

MTLAttribute

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

Declaration

class MTLAttribute : NSObject

Topics

Reading an Attribute's Properties

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 the attribute is active.

var isPatchControlPointData: Bool

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

var isPatchData: Bool

A Boolean value that indicates whether the attribute represents tessellation 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 MTLVertexAttribute

An object that represents an attribute of a vertex function.