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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)