mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-13 04:33:52 +00:00
Add dynamic resolution (#203)
This commit is contained in:
parent
2189da6f92
commit
41ded31af8
2 changed files with 91 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue