Adds GetCurrentFrameBuffertSize to allow client code to determine the current rendering size.

This commit is contained in:
Jeffery Myers 2021-02-06 09:17:22 -08:00
parent b2215cf017
commit d2bb57b2a8
2 changed files with 7 additions and 0 deletions

View File

@ -1429,6 +1429,12 @@ int GetScreenHeight(void)
return CORE.Window.screen.height; return CORE.Window.screen.height;
} }
// Get width and height of the current rendering context (screen or texture)
Vector2 GetCurrentFrameBuffertSize()
{
return (Vector2) { (float)CORE.Window.currentFbo.width, (float)CORE.Window.currentFbo.height };
}
// Get native window handle // Get native window handle
void *GetWindowHandle(void) void *GetWindowHandle(void)
{ {

View File

@ -918,6 +918,7 @@ RLAPI void SetWindowSize(int width, int height); // Set window
RLAPI void *GetWindowHandle(void); // Get native window handle RLAPI void *GetWindowHandle(void); // Get native window handle
RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenWidth(void); // Get current screen width
RLAPI int GetScreenHeight(void); // Get current screen height RLAPI int GetScreenHeight(void); // Get current screen height
RLAPI Vector2 GetCurrentFrameBuffertSize(); // Get width and height of the current rendering context (screen or texture)
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