Expose FBO aspect

So we can customize the 3d mode if desired.
This commit is contained in:
Paulo Feodrippe 2024-05-03 01:33:57 -04:00
parent f1007554a0
commit 66194d26fc
2 changed files with 7 additions and 0 deletions

View File

@ -988,6 +988,7 @@ RLAPI int GetScreenWidth(void); // Get current
RLAPI int GetScreenHeight(void); // Get current screen height RLAPI int GetScreenHeight(void); // Get current screen height
RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI) RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)
RLAPI int GetRenderHeight(void); // Get current render height (it considers HiDPI) RLAPI int GetRenderHeight(void); // Get current render height (it considers HiDPI)
RLAPI float GetCurrentAspect(); // Get current aspect (from the current FBO)
RLAPI int GetMonitorCount(void); // Get number of connected monitors RLAPI int GetMonitorCount(void); // Get number of connected monitors
RLAPI int GetCurrentMonitor(void); // Get current connected monitor RLAPI int GetCurrentMonitor(void); // Get current connected monitor
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position

View File

@ -788,6 +788,12 @@ int GetRenderHeight(void)
return height; return height;
} }
// Get current aspect (from the current FBO)
float GetCurrentAspect()
{
return (float)CORE.Window.currentFbo.width/(float)CORE.Window.currentFbo.height;
}
// Enable waiting for events on EndDrawing(), no automatic event polling // Enable waiting for events on EndDrawing(), no automatic event polling
void EnableEventWaiting(void) void EnableEventWaiting(void)
{ {