DevIL Documentation Home | Previous | Next

ilSetSharedPal

The ilSetSharedPal function sets the shared palette.


ILvoid ilSetSharedPal(
  ILubyte *Pal,
  ILuint PalSize,
  ILenum PalType
);

Parameters

Pal
Palette to copy to OpenIL's internal shared palette.
PalSize
Size of Palette in bytes.
PalType
Type of the palette. Accepted values are:

IL_PAL_RGB24
IL_PAL_RGB32
IL_PAL_RGBA32
IL_PAL_RGB16_TGA
IL_PAL_BGR24
IL_PAL_BGR32
IL_PAL_BGRA32
IL_PAL_BGR16_TGA

Remarks

ilSetSharedPal sets the palette to be used when loading images that are colour-indexed but contain no internal palette. Examples of these types of files are .cut and Doom files. By default, the shared palette is the default Doom palette.

Error Codes

IL_INVALID_PARAM - Pal was NULL, or PalSize was 0.
IL_OUT_OF_MEMORY - Could not allocate memory for the shared palette.

See Also

ilSetDoomPal