From 4e610c56cea9e62de44545e0ca74dc54ec591e70 Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Sun, 19 Apr 2020 16:42:38 +0200 Subject: [PATCH] Also apply vertical flip option on aspect ratio change --- base/camera.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/camera.hpp b/base/camera.hpp index c7036992..f602afb5 100644 --- a/base/camera.hpp +++ b/base/camera.hpp @@ -98,6 +98,9 @@ public: void updateAspectRatio(float aspect) { matrices.perspective = glm::perspective(glm::radians(fov), aspect, znear, zfar); + if (flipY) { + matrices.perspective[1, 1] *= -1.0f; + } } void setPosition(glm::vec3 position)