Contents

setViewport(_:)

Sets the viewport which that transforms vertices from normalized device coordinates to window coordinates.

Declaration

func setViewport(_ viewport: MTLViewport)

Parameters

Discussion

Metal clips fragments that lie outside this viewport, and optionally clamps fragments outside of z-near/z-far range depending on the value you assign to setDepthClipMode(_:).

See Also

Configuring viewport and scissor behavior