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

# GLKMatrixStackScale(_:_:_:_:)

Replaces the contents of the top matrix with a matrix calculated by scaling the contents of the top matrix.

## Declaration

```swift
func GLKMatrixStackScale(_ stack: GLKMatrixStack, _ sx: Float, _ sy: Float, _ sz: Float)
```

## Parameters

- `stack`: A matrix stack.
- `sx`: The scaling factor used to modify the x components.
- `sy`: The scaling factor used to modify the y components.
- `sz`: The scaling factor used to modify the z components.

## See Also

### Functions

- [GLKMatrixStackCreate(_:)](glkit/glkmatrixstackcreate(_:).md)
- [GLKMatrixStackGetMatrix2(_:)](glkit/glkmatrixstackgetmatrix2(_:).md)
- [GLKMatrixStackGetMatrix3(_:)](glkit/glkmatrixstackgetmatrix3(_:).md)
- [GLKMatrixStackGetMatrix3Inverse(_:)](glkit/glkmatrixstackgetmatrix3inverse(_:).md)
- [GLKMatrixStackGetMatrix3InverseTranspose(_:)](glkit/glkmatrixstackgetmatrix3inversetranspose(_:).md)
- [GLKMatrixStackGetMatrix4(_:)](glkit/glkmatrixstackgetmatrix4(_:).md)
- [GLKMatrixStackGetMatrix4Inverse(_:)](glkit/glkmatrixstackgetmatrix4inverse(_:).md)
- [GLKMatrixStackGetMatrix4InverseTranspose(_:)](glkit/glkmatrixstackgetmatrix4inversetranspose(_:).md)
- [GLKMatrixStackGetTypeID()](glkit/glkmatrixstackgettypeid().md)
- [GLKMatrixStackLoadMatrix4(_:_:)](glkit/glkmatrixstackloadmatrix4(_:_:).md)
- [GLKMatrixStackMultiplyMatrix4(_:_:)](glkit/glkmatrixstackmultiplymatrix4(_:_:).md)
- [GLKMatrixStackMultiplyMatrixStack(_:_:)](glkit/glkmatrixstackmultiplymatrixstack(_:_:).md)
- [GLKMatrixStackPop(_:)](glkit/glkmatrixstackpop(_:).md)
- [GLKMatrixStackPush(_:)](glkit/glkmatrixstackpush(_:).md)
- [GLKMatrixStackRotate(_:_:_:_:_:)](glkit/glkmatrixstackrotate(_:_:_:_:_:).md)
