Enumeration

MDLVertexFormat

Descriptions of the data size and layout for a vertex attribute, used by the format property.

Declaration

typedef enum MDLVertexFormat : NSUInteger {
    ...
} MDLVertexFormat;

Overview

The values for vertex formats are constructed such that you can use bit masks to infer useful information about a format:

  • The lowest order byte contains the number of vector components in a vertex format. For example, the raw value for the MDLVertexFormatChar3 format is the bitwise OR of the 3 (the number of components) with the MDLVertexFormatCharBits value.

  • Special packed formats such as MDLVertexFormatInt1010102Normalized have values less than 0x10000.

  • For unpacked formats, masking away the lower four bytes leaves information about the data type for scalars or vector components.

Topics

Constants

MDLVertexFormatInvalid

The vertex attribute has just been initialized or its format is unknown.

MDLVertexFormatPackedBit

A bit mask for vertex attributes in packed vector formats.

MDLVertexFormatUCharBits

A bit mask for vertex attributes whose components are in 8-bit unsigned integer format.

MDLVertexFormatCharBits

A bit mask for vertex attributes whose components are in 8-bit signed integer format.

MDLVertexFormatUCharNormalizedBits

A bit mask for vertex attributes whose components are in 8-bit unsigned normalized integer format.

MDLVertexFormatCharNormalizedBits

A bit mask for vertex attributes whose components are in 8-bit signed normalized integer format.

MDLVertexFormatUShortBits

A bit mask for vertex attributes whose components are in 16-bit unsigned integer format.

MDLVertexFormatShortBits

A bit mask for vertex attributes whose components are in 16-bit signed integer format.

MDLVertexFormatUShortNormalizedBits

A bit mask for vertex attributes whose components are in 16-bit unsigned normalized integer format.

MDLVertexFormatShortNormalizedBits

A bit mask for vertex attributes whose components are in 16-bit signed normalized integer format.

MDLVertexFormatUIntBits

A bit mask for vertex attributes whose components are in 32-bit unsigned integer format.

MDLVertexFormatIntBits

A bit mask for vertex attributes whose components are in 32-bit signed integer format.

MDLVertexFormatHalfBits

A bit mask for vertex attributes whose components are in 16-bit floating-point format.

MDLVertexFormatFloatBits

A bit mask for vertex attributes whose components are in 32-bit floating-point format.

MDLVertexFormatUChar

The attribute value for each vertex is a scalar of unsigned 8-bit integer type.

MDLVertexFormatUChar2

The attribute value for each vertex is a vector with 2 components, each of unsigned 8-bit integer type.

MDLVertexFormatUChar3

The attribute value for each vertex is a vector with 3 components, each of unsigned 8-bit integer type.

MDLVertexFormatUChar4

The attribute value for each vertex is a vector with 4 components, each of unsigned 8-bit integer type.

MDLVertexFormatChar

The attribute value for each vertex is a scalar of signed 8-bit integer type.

MDLVertexFormatChar2

The attribute value for each vertex is a vector with 2 components, each of signed 8-bit integer type.

MDLVertexFormatChar3

The attribute value for each vertex is a vector with 3 components, each of signed 8-bit integer type.

MDLVertexFormatChar4

The attribute value for each vertex is a vector with 4 components, each of signed 8-bit integer type.

MDLVertexFormatUCharNormalized

The attribute value for each vertex is a normalized scalar of unsigned 8-bit integer type.

MDLVertexFormatUChar2Normalized

The attribute value for each vertex is a vector with 2 components, each with a normalized value of unsigned 8-bit integer type.

MDLVertexFormatUChar3Normalized

The attribute value for each vertex is a vector with 3 components, each with a normalized value of unsigned 8-bit integer type.

MDLVertexFormatUChar4Normalized

The attribute value for each vertex is a vector with 4 components, each with a normalized value of unsigned 8-bit integer type.

MDLVertexFormatCharNormalized

The attribute value for each vertex is a normalized scalar of signed 8-bit integer type.

MDLVertexFormatChar2Normalized

The attribute value for each vertex is a vector with 2 components, each with a normalized value of signed 8-bit integer type.

MDLVertexFormatChar3Normalized

The attribute value for each vertex is a vector with 3 components, each with a normalized value of signed 8-bit integer type.

MDLVertexFormatChar4Normalized

The attribute value for each vertex is a vector with 4 components, each with a normalized value of signed 8-bit integer type.

MDLVertexFormatUShort

The attribute value for each vertex is a scalar of unsigned 16-bit integer type.

MDLVertexFormatUShort2

The attribute value for each vertex is a vector with 2 components, each of unsigned 16-bit integer type.

MDLVertexFormatUShort3

The attribute value for each vertex is a vector with 3 components, each of unsigned 16-bit integer type.

MDLVertexFormatUShort4

The attribute value for each vertex is a vector with 4 components, each of unsigned 16-bit integer type.

MDLVertexFormatShort

The attribute value for each vertex is a scalar of signed 16-bit integer type.

MDLVertexFormatShort2

The attribute value for each vertex is a vector with 2 components, each of signed 16-bit integer type.

MDLVertexFormatShort3

The attribute value for each vertex is a vector with 3 components, each of signed 16-bit integer type.

MDLVertexFormatShort4

The attribute value for each vertex is a vector with 4 components, each of signed 16-bit integer type.

MDLVertexFormatUShortNormalized

The attribute value for each vertex is a normalized scalar of unsigned 16-bit integer type.

MDLVertexFormatUShort2Normalized

The attribute value for each vertex is a vector with 2 components, each with a normalized value of unsigned 16-bit integer type.

MDLVertexFormatUShort3Normalized

The attribute value for each vertex is a vector with 3 components, each with a normalized value of unsigned 16-bit integer type.

MDLVertexFormatUShort4Normalized

The attribute value for each vertex is a vector with 4 components, each with a normalized value of unsigned 16-bit integer type.

MDLVertexFormatShortNormalized

The attribute value for each vertex is a normalized scalar of signed 16-bit integer type.

MDLVertexFormatShort2Normalized

The attribute value for each vertex is a vector with 2 components, each with a normalized value of signed 16-bit integer type.

MDLVertexFormatShort3Normalized

The attribute value for each vertex is a vector with 3 components, each with a normalized value of signed 16-bit integer type.

MDLVertexFormatShort4Normalized

The attribute value for each vertex is a vector with 4 components, each with a normalized value of signed 16-bit integer type.

MDLVertexFormatUInt

The attribute value for each vertex is a scalar of unsigned 32-bit integer type.

MDLVertexFormatUInt2

The attribute value for each vertex is a vector with 2 components, each of unsigned 32-bit integer type.

MDLVertexFormatUInt3

The attribute value for each vertex is a vector with 3 components, each of unsigned 32-bit integer type.

MDLVertexFormatUInt4

The attribute value for each vertex is a vector with 4 components, each of unsigned 32-bit integer type.

MDLVertexFormatInt

The attribute value for each vertex is a scalar of signed 32-bit integer type.

MDLVertexFormatInt2

The attribute value for each vertex is a vector with 2 components, each of signed 32-bit integer type.

MDLVertexFormatInt3

The attribute value for each vertex is a vector with 3 components, each of signed 32-bit integer type.

MDLVertexFormatInt4

The attribute value for each vertex is a vector with 4 components, each of signed 32-bit integer type.

MDLVertexFormatHalf

The attribute value for each vertex is a scalar of 16-bit floating-point type.

MDLVertexFormatHalf2

The attribute value for each vertex is a vector with 2 components, each of 16-bit floating-point type.

MDLVertexFormatHalf3

The attribute value for each vertex is a vector with 3 components, each of 16-bit floating-point type.

MDLVertexFormatHalf4

The attribute value for each vertex is a vector with 4 components, each of 16-bit floating-point type.

MDLVertexFormatFloat

The attribute value for each vertex is a scalar of 32-bit floating-point type.

MDLVertexFormatFloat2

The attribute value for each vertex is a vector with 2 components, each of 32-bit floating-point type.

MDLVertexFormatFloat3

The attribute value for each vertex is a vector with 3 components, each of 32-bit floating-point type.

MDLVertexFormatFloat4

The attribute value for each vertex is a vector with 4 components, each of 32-bit floating-point type.

MDLVertexFormatInt1010102Normalized

The attribute value for each vertex is a packed vector with 4 components of signed integer type. The first three components are 10 bits each, and the fourth component is 2 bits.

MDLVertexFormatUInt1010102Normalized

The attribute value for each vertex is a packed vector with 4 components of unsigned integer type. The first three components are 10 bits each, and the fourth component is 2 bits.

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