- fixed creation of true color textures.

The palette check was not correct so they ended up empty and caused other problems down the line.
This commit is contained in:
Christoph Oelckers 2019-12-01 21:43:54 +01:00
parent e8c5939695
commit 1cfe5be130
3 changed files with 2 additions and 2 deletions

View file

@ -697,7 +697,7 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
skyzbufferhack_pass--; skyzbufferhack_pass--;
} }
if (!tilePtr(globalpicnum)) if (!success)
GLInterface.SetColorMask(true); GLInterface.SetColorMask(true);
} }

View file

@ -96,7 +96,7 @@ FHardwareTexture* GLInstance::CreateIndexedTexture(FTexture* tex)
FHardwareTexture* GLInstance::CreateTrueColorTexture(FTexture* tex, int palid, bool checkfulltransparency, bool rgb8bit) FHardwareTexture* GLInstance::CreateTrueColorTexture(FTexture* tex, int palid, bool checkfulltransparency, bool rgb8bit)
{ {
auto palette = palid < 0? nullptr : palmanager.GetPaletteData(palid); auto palette = palid < 0? nullptr : palmanager.GetPaletteData(palid);
if (palette == nullptr) return nullptr; if (palid >= 0 && palette == nullptr) return nullptr;
auto texbuffer = tex->CreateTexBuffer(palette, CTF_ProcessData); auto texbuffer = tex->CreateTexBuffer(palette, CTF_ProcessData);
// Check if the texture is fully transparent. When creating a brightmap such textures can be discarded. // Check if the texture is fully transparent. When creating a brightmap such textures can be discarded.
if (checkfulltransparency) if (checkfulltransparency)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 26 KiB