From d7fdba0620f1ac1aca3fcec90bc3b7f4605ef499 Mon Sep 17 00:00:00 2001 From: gm-matthew <108370479+gm-matthew@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:19:09 +0100 Subject: [PATCH] Don't expend culling planes unless widescreen is enabled --- Src/Graphics/New3D/New3D.cpp | 4 +++- Src/Graphics/New3D/New3D.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/Graphics/New3D/New3D.cpp b/Src/Graphics/New3D/New3D.cpp index 4f01be3..a26f8d7 100644 --- a/Src/Graphics/New3D/New3D.cpp +++ b/Src/Graphics/New3D/New3D.cpp @@ -39,6 +39,8 @@ CNew3D::CNew3D(const Util::Config::Node &config, const std::string& gameName) : m_primType = GL_LINES_ADJACENCY; } + m_wideScreen = config["WideScreen"].ValueAs(); + m_r3dShader.LoadShader(); glUseProgram(0); @@ -1555,7 +1557,7 @@ void CNew3D::CalcViewport(Viewport* vp) vp->projectionMatrix.LoadIdentity(); // reset matrix - if ((vp->vpX == 0) && (vp->vpWidth >= 495) && (vp->vpY == 0) && (vp->vpHeight >= 383)) { + if (m_wideScreen && (vp->vpX == 0) && (vp->vpWidth >= 495) && (vp->vpY == 0) && (vp->vpHeight >= 383)) { /* * Compute aspect ratio correction factor. "Window" refers to the full GL diff --git a/Src/Graphics/New3D/New3D.h b/Src/Graphics/New3D/New3D.h index 614e2d6..1826cb8 100644 --- a/Src/Graphics/New3D/New3D.h +++ b/Src/Graphics/New3D/New3D.h @@ -258,6 +258,7 @@ private: unsigned m_xOffs, m_yOffs; unsigned m_xRes, m_yRes; // resolution of Model 3's 496x384 display area within the window unsigned m_totalXRes, m_totalYRes; // total OpenGL window resolution + bool m_wideScreen; // Real3D Base Matrix Pointer const float *m_matrixBasePtr;