Contents

present(_:afterMinimumDuration:)

Presents a drawable after the system presents the previous drawable for an amount of time.

Declaration

func present(_ drawable: any MTLDrawable, afterMinimumDuration duration: CFTimeInterval)

Parameters

  • drawable:

    An Mtldrawable instance that contains a texture the system can show on a display.

  • duration:

    The shortest display time you want the system to give to the previous drawable before presenting this one.

Discussion

This convenience method calls the drawable’s present(afterMinimumDuration:) method after the command queue schedules the command buffer for execution. The command buffer does this by adding a completion handler by calling its own addScheduledHandler(_:) method for you.

See Also

Presenting a drawable