aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/glWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client/glWrapper.cpp')
-rw-r--r--Minecraft.Client/glWrapper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Minecraft.Client/glWrapper.cpp b/Minecraft.Client/glWrapper.cpp
index a356e674..65a496fa 100644
--- a/Minecraft.Client/glWrapper.cpp
+++ b/Minecraft.Client/glWrapper.cpp
@@ -48,11 +48,12 @@ void glLoadIdentity()
RenderManager.MatrixSetIdentity();
}
-// AAR - Use calculated aspect ratio to support dynamic resizing
-extern float g_iAspectRatio;
+// AAR - Use the aspect ratio passed by the caller. For single-player this
+// equals g_iAspectRatio (screen width / height), but for split-screen
+// getFovAndAspect adjusts it to match the viewport dimensions.
void gluPerspective(float fovy, float aspect, float zNear, float zFar)
{
- RenderManager.MatrixPerspective(fovy, g_iAspectRatio, zNear, zFar);
+ RenderManager.MatrixPerspective(fovy, aspect, zNear, zFar);
}
void glOrtho(float left,float right,float bottom,float top,float zNear,float zFar)