Make palette binding lazy

This commit is contained in:
Luke Benstead 2019-03-03 18:56:18 +00:00
parent ef06af793a
commit 2382126603

View File

@ -32,6 +32,8 @@ void _glApplyColorTable() {
* - Store the active palette, don't resubmit eah time
*/
static TexturePalette* last_bound = NULL;
TexturePalette* src = NULL;
if(_glIsSharedTexturePaletteEnabled()) {
@ -50,6 +52,13 @@ void _glApplyColorTable() {
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);
GLushort i = 0;