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