Contents

signalDrawable(_:)

Schedules a signal operation on the command queue to indicate when rendering to a Metal drawable is complete.

Declaration

func signalDrawable(_ drawable: any MTLDrawable)

Parameters

Discussion

Signaling when rendering to a MTLDrawable instance is complete indicates that it’s safe to present it to the display.

You are responsible for calling this method after committing all command buffers that contain commands targeting this drawable, and before calling present(), present(at:), or present(afterMinimumDuration:).

Metal doesn’t guarantee that command buffers you commit to the command queue after calling this method execute before presentation.