diff options
| author | Fayaz Shaikh <61674751+fayaz12g@users.noreply.github.com> | 2026-03-02 18:04:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 06:04:53 +0700 |
| commit | 41ded31af8767a6a0a0da2075d6bcd7d17078873 (patch) | |
| tree | c9f529aee58998d37d2f1b6003f052d54f3e5299 /Minecraft.Client/glWrapper.cpp | |
| parent | 2189da6f924c76938a54052429ae0f27613a6b4c (diff) | |
Add dynamic resolution (#203)
Diffstat (limited to 'Minecraft.Client/glWrapper.cpp')
| -rw-r--r-- | Minecraft.Client/glWrapper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Minecraft.Client/glWrapper.cpp b/Minecraft.Client/glWrapper.cpp index b120d30b..5e0fab2c 100644 --- a/Minecraft.Client/glWrapper.cpp +++ b/Minecraft.Client/glWrapper.cpp @@ -48,9 +48,13 @@ void glLoadIdentity() RenderManager.MatrixSetIdentity(); } +extern UINT g_ScreenWidth; +extern UINT g_ScreenHeight; + void gluPerspective(float fovy, float aspect, float zNear, float zFar) { - RenderManager.MatrixPerspective(fovy,aspect,zNear,zFar); + float dynamicAspect = (float)g_ScreenWidth / (float)g_ScreenHeight; + RenderManager.MatrixPerspective(fovy, dynamicAspect, zNear, zFar); } void glOrtho(float left,float right,float bottom,float top,float zNear,float zFar) |
