MTLDrawablePresentedHandler

Type Alias MTLDrawablePresentedHandler 

Source
pub type MTLDrawablePresentedHandler = *mut DynBlock<dyn Fn(NonNull<ProtocolObject<dyn MTLDrawable>>)>;
Available on crate features MTLDrawable and block2 only.
Expand description

The presented callback function protocol

Be careful when you use delta between this presentedTime and previous frame’s presentedTime to animate next frame. If the frame was presented using presentAfterMinimumDuration or presentAtTime, the presentedTime might includes delays to meet your specified present time. If you want to measure how much frame you can achieve, use GPUStartTime in the first command buffer of your frame rendering and GPUEndTime of your last frame rendering to calculate the frame interval.

See also Apple’s documentation