|
Player12
An open source football management simulator
|
Sets the SDL render scale for a scope and restores the previous one. More...
#include <render_scale.h>
Public Member Functions | |
| ScopedRenderScale (SDL_Renderer *renderer, ImVec2 scale) | |
| ~ScopedRenderScale () | |
| ScopedRenderScale (const ScopedRenderScale &)=delete | |
| ScopedRenderScale & | operator= (const ScopedRenderScale &)=delete |
Private Attributes | |
| SDL_Renderer * | target |
| ImVec2 | previous {1.0f, 1.0f} |
Sets the SDL render scale for a scope and restores the previous one.
The SDL_Renderer ImGui backend only projects clip rectangles by the framebuffer scale; vertices stay in window coordinates. Drawing ImGui with the render scale set to DisplayFramebufferScale makes HiDPI outputs (Wayland scale 2, macOS Retina) fill the window instead of a corner.
|
inline |
|
inline |
|
delete |
|
delete |
|
private |
|
private |