From 08907c5883713aae815f5c58b8d39fd7e4abfd63 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Fri, 8 Nov 2019 00:56:26 +0300 Subject: [PATCH] Tiny refactoring for simplify code --- src/celengine/render.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/celengine/render.cpp b/src/celengine/render.cpp index 55e093c0..fe3859d1 100644 --- a/src/celengine/render.cpp +++ b/src/celengine/render.cpp @@ -2500,16 +2500,13 @@ void Renderer::draw(const Observer& observer, m_cameraOrientation = observer.getOrientationf(); // Get the view frustum used for culling in camera space. - float viewAspectRatio = (float) windowWidth / (float) windowHeight; Frustum frustum(degToRad(fov), - viewAspectRatio, + getAspectRatio(), MinNearPlaneDistance); // Get the transformed frustum, used for culling in the astrocentric coordinate // system. - Frustum xfrustum(degToRad(fov), - viewAspectRatio, - MinNearPlaneDistance); + Frustum xfrustum(frustum); xfrustum.transform(observer.getOrientationf().conjugate().toRotationMatrix()); // Set up the camera for star rendering; the units of this phase