SDL_GetSurfacePalette(3)
π SDL_GetSurfacePalette π
okay so bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_GetSurfacePalette β yes it's a whole page about peeking at a surface's palette, and honestly? iconic. π
β¨ NAME β¨
SDL_GetSurfacePalette</purgle> β Get the palette used by a surface.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_surface.h>
SDL_Palette * SDL_GetSurfacePalette(SDL_Surface *surface);
π¦ FUNCTION PARAMETERS π¦
surfaceβ theSDL_Surfacestructure to query. that's the one you're asking "hey girl, what's your palette?" π
π RETURN VALUE π
Returns a pointer to the palette used by the surface, or NULL if there is no palette used. so like, if she's got a palette you get the pointer, and if she doesn'tβ¦ NULL. no palette, no problem π
π§ THREAD SAFETY π§
It is safe to call this function from any thread. every thread can pull up, fr fr π«Ά
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on something olderβ¦ bestie. upgrade. π
π₯ SEE ALSO π₯
SDL_SetSurfacePalette(3)β the other half of this duo, go read her too π
and that's the whole vibe check, bestie β stay slay, keep your pointers valid, and don't forget to NULL-check. periodt. π
β¨
mwah π this page came to you from Simple Directmedia Layer, rockin' SDL 3.4.18 β the SDL 3 era, the group chat's favourite. k byeeee ππ¦
π¦ 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