table of contents
other versions
- experimental 3.1.0+ds-1
SDL_CreatePalette(3) | SDL3 FUNCTIONS | SDL_CreatePalette(3) |
NAME¶
SDL_CreatePalette - Create a palette structure with the specified number of color entries.
SYNOPSIS¶
#include "SDL3/SDL.h"
SDL_Palette* SDL_CreatePalette(int ncolors);
DESCRIPTION¶
The palette entries are initialized to white.
FUNCTION PARAMETERS¶
- ncolors
- represents the number of color entries in the color palette
RETURN VALUE¶
Returns a new SDL_Palette
structure on success or NULL on failure (e.g. if there wasn't enough memory);
call
SDL_GetError () for more information.
AVAILABILITY¶
This function is available since SDL 3.0.0.
SEE ALSO¶
SDL_DestroyPalette(3), SDL_SetPaletteColors(3), SDL_SetPixelFormatPalette(3)
SDL 3.1.0 | SDL |