Contents

MTLRegionMake2D(_:_:_:_:)

Creates a 3D representation of a 2D region.

Declaration

func MTLRegionMake2D(_ x: Int, _ y: Int, _ width: Int, _ height: Int) -> MTLRegion

Parameters

  • x:

    The x coordinate of the origin.

  • y:

    The y coordinate of the origin.

  • width:

    The width of the volume.

  • height:

    The height of the volume.

Return Value

A region whose x, y, width, and height values are as specified. The z coordinate of the region’s origin is set to 0, and the region’s depth is set to 1.

See Also

Creating regions