SDL_FlipMode(3type)

πŸ’… SDL_FlipMode β€” the flip mode bestie πŸ’…

okay so this is SDL_FlipMode(3type), straight out of the SDL3 DATATYPES corner of the universe, and it is exactly what it sounds like: the flip mode. the how-do-i-flip-this-thing mode. the vibe check for whether your surface goes sideways, upside down, or both. iconic behavior tbh πŸ¦‹


✨ NAME ✨

SDL_FlipMode β€” the flip mode. that's it. that's the whole name. short, sweet, slays. πŸ‘‘


🌸 SYNOPSIS 🌸

first you gotta let the header in, like letting your bestie into the group chat:

#include <SDL3/SDL_surface.h>

and then boom, here's the whole enum, every single member, no cap:

typedef enum SDL_FlipMode
{
    SDL_FLIP_NONE,                                                                  /**< Do not flip */
    SDL_FLIP_HORIZONTAL,                                                            /**< flip horizontally */
    SDL_FLIP_VERTICAL,                                                              /**< flip vertically */
    SDL_FLIP_HORIZONTAL_AND_VERTICAL = (SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL)    /**< flip horizontally and vertically (not a diagonal flip) */
} SDL_FlipMode;

so let's break the roster down, one icon at a time:

  • SDL_FLIP_NONE β€” do not flip. nothing. zero flipping. the surface stays exactly how it woke up this morning. πŸ›Œ
  • SDL_FLIP_HORIZONTAL β€” flip horizontally. left becomes right, right becomes left. mirror moment. πŸͺž
  • SDL_FLIP_VERTICAL β€” flip vertically. top becomes bottom, bottom becomes top. gravity said sike. πŸ™ƒ
  • SDL_FLIP_HORIZONTAL_AND_VERTICAL β€” flip horizontally and vertically. and bestie, read this part carefully: it is not a diagonal flip. it's the combo of both flips, defined as (SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL). do not come for me saying it's a diagonal, because it is literally not a diagonal. πŸ’€
fr fr, the = (SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL) bit is the actual definition, so that value is just the two flags OR'd together. it is giving "both", not "diagonal". periodt.

πŸŽ€ AVAILABILITY πŸŽ€

this enum has been available since SDL 3.2.0. so if you're on something older, it's not ghosting you, it just didn't exist yet. 😭


and that's the whole page, bestie. every flag, every comment, every number, all present and accounted for. you're so welcome. 🫢

this lil beauty comes to you from Simple Directmedia Layer, living in SDL 3.4.18, and it's filed under SDL_FlipMode(3type). mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from