From 8036e122364657cf7c4056d3053c9eae83c2c92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Garc=C3=ADa=20Li=C3=B1=C3=A1n?= Date: Sun, 24 Sep 2023 02:31:16 +0200 Subject: [PATCH] Fix projection matrix clamping See SimGear commit b16e0b08. --- src/Viewer/CameraGroup.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Viewer/CameraGroup.cxx b/src/Viewer/CameraGroup.cxx index e9854ffd5..2236ae50f 100644 --- a/src/Viewer/CameraGroup.cxx +++ b/src/Viewer/CameraGroup.cxx @@ -249,8 +249,8 @@ void CameraGroup::update(const osg::Vec3d& position, if ((info->flags & CameraInfo::SPLASH) == 0 && (info->flags & CameraInfo::GUI) == 0 && (info->flags & CameraInfo::FIXED_NEAR_FAR) == 0) { - ProjectionMatrix::makeNearFarPlanes(proj_matrix, _zNear, _zFar, - new_proj_matrix); + ProjectionMatrix::clampNearFarPlanes(proj_matrix, _zNear, _zFar, + new_proj_matrix); } info->viewMatrix = view_matrix;