mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-05 23:10:58 +00:00
render: Remove the logical presentation render target.
Now we render directly to the window, scaling as appropriate. This fixes some concerns the render target introduced, like the quality of the final scaled output, how to step outside of the logical size temporarily to draw some things sharply at the native resolution, and loss of sub-pixel precision. Fixes #8736.
This commit is contained in:
parent
bf7a48cdcc
commit
54459def69
16 changed files with 293 additions and 387 deletions
|
@ -63,7 +63,9 @@ typedef struct SDL_RenderViewState
|
|||
SDL_Rect pixel_clip_rect;
|
||||
bool clipping_enabled;
|
||||
SDL_FPoint scale;
|
||||
|
||||
SDL_FPoint logical_scale;
|
||||
SDL_FPoint logical_offset;
|
||||
SDL_FPoint current_scale; // this is just `scale * logical_scale`, precalculated, since we use it a lot.
|
||||
} SDL_RenderViewState;
|
||||
|
||||
// Define the SDL texture structure
|
||||
|
@ -240,9 +242,8 @@ struct SDL_Renderer
|
|||
Uint64 last_present;
|
||||
|
||||
// Support for logical output coordinates
|
||||
SDL_Texture *logical_target;
|
||||
SDL_RendererLogicalPresentation logical_presentation_mode;
|
||||
SDL_ScaleMode logical_scale_mode;
|
||||
int logical_w, logical_h;
|
||||
SDL_FRect logical_src_rect;
|
||||
SDL_FRect logical_dst_rect;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue