A render pass descriptor to draw into the current drawable.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Metal
Kit
Declaration
var currentRenderPassDescriptor: MTLRender Pass Descriptor? { get }
Discussion
This convenience property provides a render pass descriptor to render into the current drawable’s texture. MTKView
doesn’t use this descriptor, and there’s no requirement for your application to use it.
This property is nil
if the view’s device
property isn’t set or if current
is nil
. Your app should check that current
isn’t nil
before attempting to use it.
The view configures the render pass as follows:
If multisampling isn’t enabled—The color attachment at index 0 of the render pass descriptor points to the texture assigned to the current drawable, with a load action of
MTLLoad
and a store action ofAction .clear MTLStore
.Action .store If you’ve enabled multisampling—The color attachment at index 0 of the render pass descriptor points to the multisample texture, the resolve texture points to the texture assigned to the current drawable, and the attachment has a load action of
MTLLoad
and a store action ofAction .clear MTLStore
.Action .multisample Resolve If you’ve specified a depth or stencil target—The render pass configures the appropriate targets, with a load action of
MTLLoad
and a store action ofAction .clear MTLStore
.Action .dont Care