SDL_SetSurfacePalette(3)
| SDL_SetSurfacePalette(3) | SDL3 FUNCTIONS | SDL_SetSurfacePalette(3) |
NAME
SDL_SetSurfacePalette - Set the palette used by a surface.
SYNOPSIS
#include <SDL3/SDL_surface.h>
bool SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette);
DESCRIPTION
Setting the palette keeps an internal reference to the palette, which can be safely destroyed afterwards.
A single palette can be shared with many surfaces.
FUNCTION PARAMETERS
- surface
- the SDL_Surface structure to update.
- palette
- the SDL_Palette structure to use.
RETURN VALUE
Returns true on success or false on failure; call SDL_GetError() for more information.
THREAD SAFETY
This function can be called on different threads with different surfaces.
AVAILABILITY
This function is available since SDL 3.2.0.
SEE ALSO
| SDL 3.4.0 | Simple Directmedia Layer |
