SDL_SetTexturePalette
Use this function to set the color palette of an indexed texture.
Syntax
int SDL_SetTexturePalette(SDL_Texture* texture,
const SDL_Color* colors,
int firstcolor,
int ncolors)
Function Parameters
texture |
the texture to update |
colors |
an array of SDL_Color structures used to fill the palette |
firstcolor |
the index of the first palette entry to set |
ncolors |
the number of colors to set |
Return Value
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
You can add useful comments here