- 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:
parent
7bdef7fe9a
commit
662fa6e667
18 changed files with 68 additions and 56 deletions
|
|
@ -146,21 +146,12 @@ FMaterial::~FMaterial()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
IHardwareTexture *FMaterial::GetLayer(int i, int translation, FTexture **pLayer)
|
||||
IHardwareTexture *FMaterial::GetLayer(int i, int translation, FTexture **pLayer) const
|
||||
{
|
||||
FTexture *layer = i == 0 ? imgtex : mTextureLayers[i - 1];
|
||||
if (pLayer) *pLayer = layer;
|
||||
|
||||
if (layer && layer->UseType!=ETextureType::Null)
|
||||
{
|
||||
IHardwareTexture *hwtex = layer->SystemTextures.GetHardwareTexture(translation, mExpanded);
|
||||
if (hwtex == nullptr)
|
||||
{
|
||||
hwtex = CreateHardwareTexture();
|
||||
layer->SystemTextures.AddHardwareTexture(translation, mExpanded, hwtex);
|
||||
}
|
||||
return hwtex;
|
||||
}
|
||||
if (layer) return layer->GetHardwareTexture(translation, mExpanded);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue