From 8eda0f78f73e64f9ff5cb88eef95cf3dcf88b1e9 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 29 May 2025 17:58:00 +0200 Subject: [PATCH] call HWR_LoadMapTextures in paletterender toggle callback from srb2 pr --- src/hardware/hw_batching.c | 2 +- src/hardware/hw_main.c | 4 ++-- src/st_stuff.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index 3655beb8a..b8490f4ed 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -124,7 +124,7 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt polygonArray[polygonArraySize].numVerts = iNumPts; polygonArray[polygonArraySize].polyFlags = PolyFlags; polygonArray[polygonArraySize].texture = current_texture; - polygonArray[polygonArraySize].shader = (shader_target != -1) ? HWR_GetShaderFromTarget(shader_target) : shader_target; + polygonArray[polygonArraySize].shader = (shader_target != SHADER_NONE) ? HWR_GetShaderFromTarget(shader_target) : shader_target; polygonArray[polygonArraySize].horizonSpecial = horizonSpecial; polygonArraySize++; diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 94767ff5d..d2b6a6327 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5750,7 +5750,7 @@ static void HWR_TogglePaletteRendering(void) // 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. - GL_ClearMipMapCache(); + HWR_LoadMapTextures(numtextures); } } else @@ -5764,7 +5764,7 @@ static void HWR_TogglePaletteRendering(void) // 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. - GL_ClearMipMapCache(); + HWR_LoadMapTextures(numtextures); } } } diff --git a/src/st_stuff.c b/src/st_stuff.c index 04523f577..4f5401aae 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -187,7 +187,7 @@ void ST_doPaletteStuff(void) #ifdef HWRENDER if (rendermode == render_opengl && !HWR_PalRenderFlashpal()) - palette = 0; // No flashpals here in OpenGL + palette = 0; // Don't set the palette to a flashpal in OpenGL's truecolor mode #endif palette = min(max(palette, 0), 13);