- added some things from Raze to allow using the same code in both projects.

This commit is contained in:
Christoph Oelckers 2020-04-11 19:51:22 +02:00
commit 1e40b745d5
13 changed files with 189 additions and 41 deletions

View file

@ -88,6 +88,25 @@ TArray<uint8_t> FImageTexture::Get8BitPixels(bool alpha)
return mImage->GetPalettedPixels(alpha? alpha : bNoRemap0 ? FImageSource::noremap0 : FImageSource::normal);
}
//===========================================================================
//
// use the already known state of the underlying image to save time.
//
//===========================================================================
bool FImageTexture::DetermineTranslucency()
{
if (mImage->bTranslucent != -1)
{
bTranslucent = mImage->bTranslucent;
return !!bTranslucent;
}
else
{
return FTexture::DetermineTranslucency();
}
}
FTexture* CreateImageTexture(FImageSource* img, const char *name) noexcept
{