SDL_FlipSurface(3)
π SDL_FlipSurface(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_FlipSurface β yes, the one that flips a surface vertically or horizontally. it's giving "mirror mirror on the wall" but for pixels. πͺβ¨
πΈ NAME πΈ
SDL_FlipSurface β flip a surface vertically or horizontally. that's it, that's the whole job, and she does it flawlessly. π
π SYNOPSIS π
#include <SDL3/SDL_surface.h>
bool SDL_FlipSurface(SDL_Surface *surface, SDL_FlipMode flip);
like. two args. in, out, flipped. no cap. π¦
β¨ FUNCTION PARAMETERS β¨
surfaceβ the surface you wanna flip. your canvas, your blorbo, your little pixel baby. π«Άflipβ the direction to flip. which way are we yeeting this thing? that's whatSDL_FlipModeis here to tell you. π§
π RETURN VALUE π
returns true when it ate and left no crumbs (aka success), or false if it did NOT go well (aka failure). and if it failed, bestie, go call SDL_GetError() for more information β she will tell you exactly what went wrong, no gatekeeping. π
π§ THREAD SAFETY π§
this function can be called on different threads with different surfaces. so yes, you and your mutuals can each flip your own surface simultaneously, everybody gets their own. it's called community, look it up. π
β AVAILABILITY β
this function is available since SDL 3.2.0. if you're on anything older, she simply does not exist yet, so. upgrade era. π
lowkey a reminder: flip responsibly, check your return value, and always SDL_GetError() when things get messy. the error message is your bestie too. π
mwah π that's the whole page! this lil' slice of the manual is brought to you by Simple Directmedia Layer, straight outta SDL 3.4.18, and this specific page is dated SDL_FlipSurface(3) β yeah, same name as the function, the page said "I am her." πβ¨ bye bestie, go flip something pretty! π¦πΈ
π¦ 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