Contents

MTLStructMember

An instance that provides information about a field in a structure.

Declaration

class MTLStructMember

Overview

MTLStructMember is part of the reflection API that allows Metal framework code to query details about an argument of a Metal shading language function. An MTLStructMember instance describes the data type of one field in a struct that is passed as an MTLFunction argument, which is represented by MTLArgument.

Don’t create MTLStructMember instances directly. You obtain an MTLStructMember instance from either the members property or the memberByName(_:) method of an MTLStructType instance. The dataType property of the MTLStructMember instance tells you what kind of data is stored in the member. Recursively drill down every struct member until you reach a data type that is neither a struct nor an array.

Topics

Describing the struct member

Obtaining struct member details

Instance Methods

See Also

Shader types