diff options
Diffstat (limited to 'Minecraft.Client/glWrapper.cpp')
| -rw-r--r-- | Minecraft.Client/glWrapper.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Minecraft.Client/glWrapper.cpp b/Minecraft.Client/glWrapper.cpp index 540271b9..a356e674 100644 --- a/Minecraft.Client/glWrapper.cpp +++ b/Minecraft.Client/glWrapper.cpp @@ -48,13 +48,11 @@ void glLoadIdentity() RenderManager.MatrixSetIdentity(); } -extern int g_iScreenWidth; -extern int g_iScreenHeight; - +// AAR - Use calculated aspect ratio to support dynamic resizing +extern float g_iAspectRatio; void gluPerspective(float fovy, float aspect, float zNear, float zFar) { - float dynamicAspect = (float)g_iScreenWidth / (float)g_iScreenHeight; - RenderManager.MatrixPerspective(fovy, dynamicAspect, zNear, zFar); + RenderManager.MatrixPerspective(fovy, g_iAspectRatio, zNear, zFar); } void glOrtho(float left,float right,float bottom,float top,float zNear,float zFar) |
