---
title: "GLKMatrix4MakePerspective(_:_:_:_:)"
framework: GLKit
role: symbol
role_heading: Function
platforms: [iOS 5.0+, iPadOS 5.0+, macOS 10.8+, tvOS 9.0+]
path: "glkit/glkmatrix4makeperspective(_:_:_:_:)"
---

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

Returns a 4x4 perspective projection matrix.

## Declaration

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

Return Value A new projection matrix.

## See Also

### Creating Matrices

- [GLKMatrix4Make(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4make(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeAndTranspose(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4makeandtranspose(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeWithArray(_:)](glkit/glkmatrix4makewitharray(_:).md)
- [GLKMatrix4MakeWithArrayAndTranspose(_:)](glkit/glkmatrix4makewitharrayandtranspose(_:).md)
- [GLKMatrix4MakeWithColumns(_:_:_:_:)](glkit/glkmatrix4makewithcolumns(_:_:_:_:).md)
- [GLKMatrix4MakeWithRows(_:_:_:_:)](glkit/glkmatrix4makewithrows(_:_:_:_:).md)
- [GLKMatrix4MakeRotation(_:_:_:_:)](glkit/glkmatrix4makerotation(_:_:_:_:).md)
- [GLKMatrix4MakeXRotation(_:)](glkit/glkmatrix4makexrotation(_:).md)
- [GLKMatrix4MakeYRotation(_:)](glkit/glkmatrix4makeyrotation(_:).md)
- [GLKMatrix4MakeZRotation(_:)](glkit/glkmatrix4makezrotation(_:).md)
- [GLKMatrix4MakeWithQuaternion(_:)](glkit/glkmatrix4makewithquaternion(_:).md)
- [GLKMatrix4MakeScale(_:_:_:)](glkit/glkmatrix4makescale(_:_:_:).md)
- [GLKMatrix4MakeTranslation(_:_:_:)](glkit/glkmatrix4maketranslation(_:_:_:).md)
- [GLKMatrix4MakeLookAt(_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4makelookat(_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeOrtho(_:_:_:_:_:_:)](glkit/glkmatrix4makeortho(_:_:_:_:_:_:).md)
