SDL_SurfaceFlags(3type)
π SDL_SurfaceFlags π
okay bestie, welcome to the SDL_SurfaceFlags(3type) page β this is from the SDL3 datatypes corner of the manual, and it's genuinely such a cute little typedef, no cap. sit down, grab a strawberry π, let's get into it.
β¨ NAME β¨
SDL_SurfaceFlags β the flags on an SDL_Surface.
like, all of them. the whole vibe check of a surface, in one Uint32. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_surface.h>
typedef Uint32 SDL_SurfaceFlags;
#define SDL_SURFACE_PREALLOCATED 0x00000001u /**< Surface uses preallocated pixel memory */
#define SDL_SURFACE_LOCK_NEEDED 0x00000002u /**< Surface needs to be locked to access pixels */
#define SDL_SURFACE_LOCKED 0x00000004u /**< Surface is currently locked */
#define SDL_SURFACE_SIMD_ALIGNED 0x00000008u /**< Surface uses pixel memory allocated with SDL_aligned_alloc() */
okay so let's break down the cast of characters, because each one of these is a whole personality:
SDL_SURFACE_PREALLOCATEDβ value0x00000001uβ the surface is using preallocated pixel memory. she came with her own pixels, she didn't borrow yours. πSDL_SURFACE_LOCK_NEEDEDβ value0x00000002uβ the surface needs to be locked before you can access pixels. read the room, lock first. πSDL_SURFACE_LOCKEDβ value0x00000004uβ the surface is currently locked. right now. as we speak. πSDL_SURFACE_SIMD_ALIGNEDβ value0x00000008uβ the surface uses pixel memory allocated withSDL_aligned_alloc(). aligned, gorgeous, SIMD-ready, main character energy. β¨
ngl, the exact hex values matter β don't go renaming them or remixing them, they're literally bit flags and the bits are doing bits. π
π DESCRIPTION π
so these flags? they're generally considered read-only. like, look but don't touch. admire from afar. do not be out here editing them and then acting surprised when things get weird. π
that's the whole description. short, iconic, periodt. π
π¦ AVAILABILITY π¦
this datatype has been available since SDL 3.2.0. so if you're on anything older, bestie, it's giving "not yet" π β go update.
and that's the page!! every flag accounted for, nothing skipped, we ate and left no crumbs π«Άβ¨
sending you off with love from Simple Directmedia Layer β this was SDL 3.4.18, and yes, this exact page is SDL_SurfaceFlags(3type). mwah π go lock your surfaces. π
π¦ 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