mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-05-30 16:50:50 +00:00
- 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:
parent
4178d48fb6
commit
758e4ad7cb
9 changed files with 53 additions and 333 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue