Enumeration

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

property.

SDKs

iOS 9.0+ macOS 10.11+ UIKit for Mac 13.0+ Beta tvOS 9.0+ 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 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.

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.

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.

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.

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.

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.

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.

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