- make the engine consistently use BGRA data - the internal palettes were still RGBA, which caused problems down the line.

- increased cache size to 200 MB (Note: The cache really needs to be replaced with something better that can adapt better to a system's RAM size.)
This commit is contained in:
Christoph Oelckers 2019-10-19 10:21:07 +02:00
parent 8b1f2f5fc9
commit bc986b8054
9 changed files with 39 additions and 33 deletions

View file

@ -46,9 +46,9 @@ FHardwareTexture *gloadtex(const int32_t *picbuf, int32_t xsiz, int32_t ysiz, in
{
for (bssize_t i=xsiz*ysiz-1; i>=0; i--)
{
pic2[i].r = pic[i].r;
pic2[i].r = pic[i].b;
pic2[i].g = pic[i].g;
pic2[i].b = pic[i].b;
pic2[i].b = pic[i].r;
pic2[i].a = 255;
}
}
@ -61,16 +61,16 @@ FHardwareTexture *gloadtex(const int32_t *picbuf, int32_t xsiz, int32_t ysiz, in
{
const int32_t ii = palookup[dapal][pic[i].a];
pic2[i].r = curpalette[ii].r;
pic2[i].r = curpalette[ii].b;
pic2[i].g = curpalette[ii].g;
pic2[i].b = curpalette[ii].b;
pic2[i].b = curpalette[ii].r;
pic2[i].a = 255;
}
}
auto tex = GLInterface.NewTexture();
tex->CreateTexture(xsiz, ysiz, false, false);
tex->LoadTexture((uint8_t*)pic2); // RGBA
tex->LoadTexture((uint8_t*)pic2);
tex->SetSampler(SamplerNoFilter);
Xfree(pic2);