Make palette binding lazy
This commit is contained in:
parent
ef06af793a
commit
2382126603
@ -32,6 +32,8 @@ void _glApplyColorTable() {
|
|||||||
* - Store the active palette, don't resubmit eah time
|
* - Store the active palette, don't resubmit eah time
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static TexturePalette* last_bound = NULL;
|
||||||
|
|
||||||
TexturePalette* src = NULL;
|
TexturePalette* src = NULL;
|
||||||
|
|
||||||
if(_glIsSharedTexturePaletteEnabled()) {
|
if(_glIsSharedTexturePaletteEnabled()) {
|
||||||
@ -50,6 +52,13 @@ void _glApplyColorTable() {
|
|||||||
src = active->palette;
|
src = active->palette;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't reapply the palette if it was the last one we applied */
|
||||||
|
if(src == last_bound) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
last_bound = src;
|
||||||
|
|
||||||
pvr_set_pal_format(PVR_PAL_ARGB8888);
|
pvr_set_pal_format(PVR_PAL_ARGB8888);
|
||||||
|
|
||||||
GLushort i = 0;
|
GLushort i = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user