- removed the conversion helper code and fixed a few places where FMaterial was only used to access the hardware textures in the FTexture class.

This commit is contained in:
Christoph Oelckers 2020-04-16 00:21:13 +02:00
commit 662fa6e667
18 changed files with 68 additions and 56 deletions

View file

@ -990,6 +990,27 @@ void FTexture::SetSpriteRect()
}
//===========================================================================
//
// Create a hardware texture for this texture image.
//
//===========================================================================
IHardwareTexture* FTexture::GetHardwareTexture(int translation, bool expanded)
{
if (UseType != ETextureType::Null)
{
IHardwareTexture* hwtex = SystemTextures.GetHardwareTexture(translation, expanded);
if (hwtex == nullptr)
{
hwtex = CreateHardwareTexture();
SystemTextures.AddHardwareTexture(translation, expanded, hwtex);
}
return hwtex;
}
return nullptr;
}
//===========================================================================
//
// Coordinate helper.