Decrease the amount of texture clearing when switching palette rendering state

This commit is contained in:
Hannu Hanhi 2021-06-14 00:57:20 +03:00
parent cf16fd2938
commit 725a8195ab

View file

@ -6342,10 +6342,10 @@ static void HWR_TogglePaletteRendering(void)
HWR_SetMapPalette();
HWR_SetPalette(pLocalPalette);
// If the r_opengl "texture palette" stays the same during this switch, the textures
// If the r_opengl "texture palette" stays the same during this switch, these textures
// will not be cleared out. However they are still out of date since the
// composite texture blending method has changed. Therefore they need to be cleared.
HWD.pfnClearMipMapCache();
HWR_LoadMapTextures(numtextures);
}
}
else
@ -6356,10 +6356,10 @@ static void HWR_TogglePaletteRendering(void)
gl_palette_rendering_state = false;
textureformat = GL_TEXFMT_RGBA;
HWR_SetPalette(pLocalPalette);
// If the r_opengl "texture palette" stays the same during this switch, the textures
// If the r_opengl "texture palette" stays the same during this switch, these textures
// will not be cleared out. However they are still out of date since the
// composite texture blending method has changed. Therefore they need to be cleared.
HWD.pfnClearMipMapCache();
HWR_LoadMapTextures(numtextures);
}
}
}