From 725a8195ab28282f2ac1f5fc9924df8c7bc280f8 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Mon, 14 Jun 2021 00:57:20 +0300 Subject: [PATCH] Decrease the amount of texture clearing when switching palette rendering state --- src/hardware/hw_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index cb976a8f8..2f525d736 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -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); } } }