SDL_Render...resentation(3type)
β¨ NAME β¨
SDL_RendererLogicalPresentation β literally the whole vibe of how your logical size gets mapped onto the output π
Like, it's giving "where do my pixels actually go", bestie.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_render.h>
typedef enum SDL_RendererLogicalPresentation
{
SDL_LOGICAL_PRESENTATION_DISABLED, /**< There is no logical size in effect */
SDL_LOGICAL_PRESENTATION_STRETCH, /**< The rendered content is stretched to the output resolution */
SDL_LOGICAL_PRESENTATION_LETTERBOX, /**< The rendered content is fit to the largest dimension and the other dimension is letterboxed with the clear color */
SDL_LOGICAL_PRESENTATION_OVERSCAN, /**< The rendered content is fit to the smallest dimension and the other dimension extends beyond the output bounds */
SDL_LOGICAL_PRESENTATION_INTEGER_SCALE /**< The rendered content is scaled up by integer multiples to fit the output resolution */
} SDL_RendererLogicalPresentation;
okay so this is an enum, and every single member is a whole mood. let me break it down so you don't have to guess π«Ά
SDL_LOGICAL_PRESENTATION_DISABLEDβ no logical size is in effect. like, nothing is happening, we're just existing π¦SDL_LOGICAL_PRESENTATION_STRETCHβ your rendered content gets stretched to the output resolution. she's flexible, she adapts, no cap π₯SDL_LOGICAL_PRESENTATION_LETTERBOXβ the rendered content is fit to the largest dimension, and the other dimension gets letterboxed with the clear color. iconic cinematic bars energy πSDL_LOGICAL_PRESENTATION_OVERSCANβ the rendered content is fit to the smallest dimension, and the other dimension extends beyond the output bounds. she's too big for the frame, main character behavior πSDL_LOGICAL_PRESENTATION_INTEGER_SCALEβ the rendered content is scaled up by integer multiples to fit the output resolution. crisp, clean, mathematically correct, we stan β
bestie reminder: these are the exact enum members, so type them exactly like that. no renaming, no merging, no "fixing" β periodt. π
π AVAILABILITY π
This enum is available since SDL 3.2.0. so if you're on anything older... not me finding out the hard way π
Simple Directmedia Layer is the source of this whole page, and it's serving SDL 3.4.18 realness, so go forth and render responsibly, queen πβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms