<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRegionMake2D(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@F@MTLRegionMake2D"
  },
  "title" : "MTLRegionMake2D(_:_:_:_:)"
}
-->

# MTLRegionMake2D(_:_:_:_:)

Creates a 3D representation of a 2D region.

```
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`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)