Structure

MTLScissorRect

A rectangle for the scissor fragment test.

Declaration

struct MTLScissorRect

Topics

Specifying Scissor Boundaries

var height: Int

The height of the scissor rectangle, in pixels.

var width: Int

The width of the scissor rectangle, in pixels.

var x: Int

The x window coordinate of the upper-left corner of the scissor rectangle.

var y: Int

The y window coordinate of the upper-left corner of the scissor rectangle.

See Also

Setting Viewport and Scissor Behavior

Rendering to Multiple Viewports in a Draw Command

Select viewports and their corresponding scissor rectangles in your vertex shader.

func setViewport(MTLViewport)

Sets the viewport used for transformations and clipping.

Required.

func setViewports([MTLViewport])

Sets an array of viewports.

func setScissorRect(MTLScissorRect)

Sets the scissor rectangle for a fragment scissor test.

Required.

func setScissorRects([MTLScissorRect])

Sets an array of scissor rectangles.

struct MTLViewport

A 3D rectangular region for the viewport clipping.