Add dynamic resolution (#203)

This commit is contained in:
Fayaz Shaikh
2026-03-02 18:04:53 -05:00
committed by GitHub
parent 2189da6f92
commit 41ded31af8
2 changed files with 91 additions and 1 deletions

View File

@@ -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)