A depth and stencil state object that specifies the depth and stencil configuration and operations used in a render pass.
- iOS 8.0+
- macOS 10.11+
- tvOS 9.0+
MTLDepth protocol defines the interface for a lightweight object used to encode how a graphics rendering pass should perform depth and stencil operations. The
MTLRender uses a
MTLDepth object to set the depth and stencil state for a rendering pass.
Do not use standard allocation and initialization techniques to create a
MTLDepth object. To create a
MTLDepthobject that defines the operations you want the rendering pass to use.
Typically, you create
MTLDepth objects when your app is first initialized and then reuse them throughout the lifetime of your app.