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

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 MTLVertexDescriptor

An object that describes how vertex data is organized and mapped to 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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software