- avoid using global palette settings when drawing 2D content with a custom palette.

Instead pass the palette info with the render call to avoid stale global state.
This commit is contained in:
Christoph Oelckers 2020-05-23 14:36:35 +02:00
parent 57efff200a
commit b971bc2717
26 changed files with 139 additions and 184 deletions

View file

@ -201,7 +201,7 @@ bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int
applytint = true;
if (!(h.f & HICTINT_APPLYOVERPALSWAP)) usepalswap = 0;
}
lookuppal = palmanager.LookupPalette(usepalette, usepalswap, false,fixpalette < 0? !!(curpaletteflags & Pal_Fullscreen) : 0);
lookuppal = palmanager.LookupPalette(usepalette, usepalswap, false, 0);
}
}
@ -286,7 +286,7 @@ bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int
}
}
#if 1
if (!(tex->PicAnim.sf & PICANM_NOFULLBRIGHT_BIT) && !(globalflags & GLOBAL_NO_GL_FULLBRIGHT) && !tex->NoBrightmapFlag[usepalswap] && !(curpaletteflags & (Pal_Fullscreen|Pal_2D)))
if (!(tex->PicAnim.sf & PICANM_NOFULLBRIGHT_BIT) && !(globalflags & GLOBAL_NO_GL_FULLBRIGHT) && !tex->NoBrightmapFlag[usepalswap])
{
if (TextureType == TT_HICREPLACE)
{