Merge pull request #165 from gm-matthew/widescreen

Don't expand culling planes unless widescreen is enabled
This commit is contained in:
dukeeeey 2024-07-19 16:32:45 +01:00 committed by GitHub
commit 5fa402f2f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -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<bool>();
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

View file

@ -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;