- added a few more texture formats to FHardwareTexture.

For brightmaps we do not need full RGBA8 data with mipmaps - RGBA2 without mipmaps is fully sufficient here and will save a lot of video memory.
This commit is contained in:
Christoph Oelckers 2019-10-19 23:14:36 +02:00
parent 7d2f61db2e
commit bb4a19cf3a
9 changed files with 34 additions and 64 deletions

View file

@ -27,7 +27,7 @@ bool glsurface_initialize(vec2_t bufferResolution)
buffer.Resize(bufferRes.x * bufferRes.y);
bufferTexture = GLInterface.NewTexture();
bufferTexture->CreateTexture(bufferRes.x, bufferRes.y, true, false);
bufferTexture->CreateTexture(bufferRes.x, bufferRes.y, FHardwareTexture::Indexed, false);
glsurface_setPalette(curpalettefaded);
GLInterface.SetSurfaceShader();
@ -52,7 +52,7 @@ void glsurface_setPalette(void* pPalette)
if (!paletteTexture)
{
paletteTexture = GLInterface.NewTexture();
paletteTexture->CreateTexture(256, 1, false, false);
paletteTexture->CreateTexture(256, 1, FHardwareTexture::TrueColor, false);
}
paletteTexture->LoadTexture(palette);
GLInterface.BindTexture(1, paletteTexture, SamplerNoFilterClampXY);