]> git.lizzy.rs Git - shadowclad.git/blob - src/engine/ui.c
Add copyright and license notices in source code
[shadowclad.git] / src / engine / ui.c
1 /**
2  * Copyright 2018-2020 Iwo 'Outfrost' Bujkiewicz
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8
9 #include "ui.h"
10
11 #include "_prelude.h"
12 #include "render.h"
13
14 void resizeStage(GLFWwindow* window UNUSED, int width, int height) {
15         if (height == 0)
16                 height = 1;
17
18         glViewport(0, 0, width, height);
19
20         viewportAspectRatio = (float) width / (float) height;
21 }