An object that provides information about a field in a struct.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
MTLStruct is part of the reflection API that allows Metal framework code to query details about an argument of a Metal shading language function. A
MTLStruct object describes the data type of one field in a struct that is passed as a
MTLFunction argument, which is represented by
MTLStruct objects directly. You obtain a
MTLStruct object from either the
members property or the
member method of a
MTLStruct object. The
data property of the
MTLStruct object 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.