- stripped down the palette manager in the GL backend and let it use the data that's managed elsewhere.

This class is only needed to manage the palette textures used by the indexed render mode, all the rest is available globally.
This commit is contained in:
Christoph Oelckers 2020-05-25 00:31:05 +02:00
parent 4178d48fb6
commit 758e4ad7cb
9 changed files with 53 additions and 333 deletions

View file

@ -1136,14 +1136,14 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
int prevClamp = GLInterface.GetClamp();
GLInterface.SetClamp(0);
#if 1
int palId = GLInterface.LookupPalette(curbasepal, globalpal, false);
auto palette = GLInterface.GetPaletteData(palId);
int palId = TRANSLATION(Translation_Remap + curbasepal, globalpal);
auto palette = GPalette.TranslationToTable(palId);
if (!m->texIds) m->texIds = new TMap<int, FHardwareTexture*>;
auto pTex = m->texIds->CheckKey(palId);
FHardwareTexture* htex;
if (!pTex)
{
htex = gloadtex(m->mytex, m->mytexx, m->mytexy, m->is8bit, palette);
htex = gloadtex(m->mytex, m->mytexx, m->mytexy, m->is8bit, palette->Palette);
m->texIds->Insert(palId, htex);
}
else