mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-11 19:53:52 +00:00
Fix for any aspect ratio in 3D Environments (#320)
* Add initial AnyAspectRatio support * Remove some logic that didn't work * Remove rogue back slash * Remove more remnants * Update UILayer.h * Update some comments * Remove WIP UI changes * Fix diffs * Remove UI resize call from `UpdateAspectRatio` * handle merge conflict * Update to C++ style static cast * Fix syntax
This commit is contained in:
parent
5922824950
commit
9372887aef
3 changed files with 22 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue