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

# GLKMatrix4MakePerspective(_:_:_:_:)

Returns a `4x4` perspective projection matrix.

```
func GLKMatrix4MakePerspective(_ fovyRadians: Float, _ aspect: Float, _ nearZ: Float, _ farZ: Float) -> GLKMatrix4
```

## Parameters

`fovyRadians`

The angle of the vertical viewing area.

`aspect`

The ratio between the horizontal and the vertical viewing area.

`nearZ`

The near clipping distance. Must be positive.

`farZ`

The far clipping distance.  Must be positive and greater than the near distance.

## Return Value

A new projection matrix.

---

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)