KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches

Color palette management API of the PowerVR. More...

Modules

 Formats
 Color palette formats of the PowerVR.
 

Functions

void pvr_set_pal_format (int fmt)
 Set the palette format.
 
static void pvr_set_pal_entry (uint32_t idx, uint32_t value)
 Set a palette value.
 

Detailed Description

Color palette management API of the PowerVR.

In addition to its 16-bit truecolor modes, the PVR also supports some nice paletted modes.

Remarks
These aren't useful for super high quality images most of the time, but they can be useful for doing some interesting special effects, like the old cheap "worm hole".

Function Documentation

◆ pvr_set_pal_entry()

static void pvr_set_pal_entry ( uint32_t  idx,
uint32_t  value 
)
inlinestatic

Set a palette value.

Note that while the color format is variable, each entry is still 32-bits in length regardless (and you only get a total of 1024 of them). If using one of the 16-bit palette formats, only the low-order 16-bits of the entry are valid, and the high bits should be filled in with 0.

Parameters
idxThe index to set to (0-1023)
valueThe color value to set in that palette entry

References PVR_PALETTE_TABLE_BASE, and PVR_SET.

◆ pvr_set_pal_format()

void pvr_set_pal_format ( int  fmt)

Set the palette format.

This function sets the currently active palette format on the PVR. Each entry in the palette table is 32-bits in length, regardless of what color format is in use.

Be sure to use care when using the PVR_PAL_ARGB8888 format. Rendering speed is greatly affected (cut about in half) if you use any filtering with paletted textures with ARGB8888 entries in the palette.

Parameters
fmtThe format to use
See also
Formats