diff options
author | David Robillard <d@drobilla.net> | 2019-11-09 12:14:29 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-11-09 12:15:17 +0100 |
commit | 2b029213f97910692d1e48e097cc5cc1ad3b44b7 (patch) | |
tree | bac32d9655b1ad95b25cc0c7c777c50e2f977801 /test | |
parent | 121bd7edc2ef105836304215d21aa733368f13f4 (diff) | |
download | pugl-2b029213f97910692d1e48e097cc5cc1ad3b44b7.tar.gz pugl-2b029213f97910692d1e48e097cc5cc1ad3b44b7.tar.bz2 pugl-2b029213f97910692d1e48e097cc5cc1ad3b44b7.zip |
Fix various clang-tidy warnings
Diffstat (limited to 'test')
-rw-r--r-- | test/pugl_test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/pugl_test.c b/test/pugl_test.c index 6558bf6..f895184 100644 --- a/test/pugl_test.c +++ b/test/pugl_test.c @@ -70,6 +70,8 @@ onReshape(PuglView* view, int width, int height) { (void)view; + const float aspect = (float)width / (float)height; + glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); glClearColor(0.2f, 0.2f, 0.2f, 1.0f); @@ -79,7 +81,7 @@ onReshape(PuglView* view, int width, int height) glViewport(0, 0, width, height); float projection[16]; - perspective(projection, 1.8f, width / (float)height, 1.0, 100.0f); + perspective(projection, 1.8f, aspect, 1.0f, 100.0f); glLoadMatrixf(projection); } |