- fixed a few things that slipped through

This commit is contained in:
Christoph Oelckers 2020-04-19 12:40:30 +02:00
parent b2281c38e1
commit d4cc217d42
2 changed files with 3 additions and 3 deletions

View file

@ -325,7 +325,7 @@ void FGLRenderState::ApplyMaterial(FMaterial *mat, int clampmode, int translatio
int numLayers = mat->NumLayers();
MaterialLayerInfo* layer;
auto base = static_cast<FHardwareTexture*>(mat->GetLayer(0, translation));
auto base = static_cast<FHardwareTexture*>(mat->GetLayer(0, translation, &layer));
if (base->BindOrCreate(tex->GetTexture(), 0, clampmode, translation, layer->scaleFlags))
{

View file

@ -97,7 +97,7 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
TArray<FTexture*> layers;
// First collect the potential max. texture set
for (unsigned i = 1; i < TexMan.NumTextures(); i++)
for (int i = 1; i < TexMan.NumTextures(); i++)
{
auto gametex = TexMan.GameByIndex(i);
if (gametex &&
@ -258,7 +258,7 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
// delete unused hardware textures (i.e. those which didn't get referenced by any material in the cache list.)
decltype(allTextures)::Iterator ita(allTextures);
decltype(allTextures)::Pair* paira;
while (it.NextPair(pair))
while (ita.NextPair(paira))
{
paira->Key->CleanUnused();
}