Use floating point values for viewport, clip rectangle, and texture sizes

These are integer values internally, but the API has been changed to make it easier to mix other render code with querying those values.

Fixes https://github.com/libsdl-org/SDL/issues/7519
This commit is contained in:
Sam Lantinga 2024-06-12 09:21:02 -07:00
parent 463984ec20
commit 9fb5a9ccac
29 changed files with 624 additions and 585 deletions

View file

@ -48,10 +48,12 @@ typedef struct SDL_RenderDriver SDL_RenderDriver;
/* Rendering view state */
typedef struct SDL_RenderViewState
{
int pixel_w;
int pixel_h;
SDL_Rect viewport;
SDL_Rect clip_rect;
float pixel_w;
float pixel_h;
SDL_FRect viewport;
SDL_Rect pixel_viewport;
SDL_FRect clip_rect;
SDL_Rect pixel_cliprect;
SDL_bool clipping_enabled;
SDL_FPoint scale;