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.

Declaration

class MTLVertexAttributeDescriptor : NSObject

Overview

A vertex attribute descriptor provides organization information so a vertex shader function can locate and load data into its arguments. The descriptor maps memory locations to attribute locations. It supports access to multiple attributes (such as vertex coordinates, surface normals, and texture coordinates) that are interleaved within the same buffer.

Topics

Organizing the Vertex Attribute

var format: MTLVertexFormat

The format of the vertex attribute.

var offset: Int

The location of an attribute in vertex data, determined by the byte offset from the start of the vertex data.

var bufferIndex: Int

The index in the argument table for the associated vertex buffer.

Constants

enum MTLVertexFormat

Values that specify the organization of function vertex data.

Relationships

Inherits From

See Also

Specifying Buffer Layouts and Fetch Behavior

var vertexDescriptor: MTLVertexDescriptor?

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

class MTLVertexDescriptor

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

class MTLVertexBufferLayoutDescriptor

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