KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Color palette management API of the PowerVR More...
Topics | |
Formats | |
Color palette formats of the PowerVR | |
Functions | |
void | pvr_set_pal_format (pvr_palfmt_t fmt) |
Set the palette format. | |
static void | pvr_set_pal_entry (uint32_t idx, uint32_t value) |
Set a palette value. | |
Color palette management API of the PowerVR
In addition to its 16-bit truecolor modes, the PVR also supports some nice paletted modes.
|
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.
idx | The index to set to (0-1023) |
value | The color value to set in that palette entry |
References PVR_PALETTE_TABLE_BASE, and PVR_SET.
void pvr_set_pal_format | ( | pvr_palfmt_t | 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.
fmt | The format to use |