From d4cc217d421a952471ebdffc34b6e6a99110392f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Apr 2020 12:40:30 +0200 Subject: [PATCH] - fixed a few things that slipped through --- src/rendering/gl/renderer/gl_renderstate.cpp | 2 +- src/rendering/hwrenderer/textures/hw_precache.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rendering/gl/renderer/gl_renderstate.cpp b/src/rendering/gl/renderer/gl_renderstate.cpp index 653daa4e7..16dbedcbe 100644 --- a/src/rendering/gl/renderer/gl_renderstate.cpp +++ b/src/rendering/gl/renderer/gl_renderstate.cpp @@ -325,7 +325,7 @@ void FGLRenderState::ApplyMaterial(FMaterial *mat, int clampmode, int translatio int numLayers = mat->NumLayers(); MaterialLayerInfo* layer; - auto base = static_cast(mat->GetLayer(0, translation)); + auto base = static_cast(mat->GetLayer(0, translation, &layer)); if (base->BindOrCreate(tex->GetTexture(), 0, clampmode, translation, layer->scaleFlags)) { diff --git a/src/rendering/hwrenderer/textures/hw_precache.cpp b/src/rendering/hwrenderer/textures/hw_precache.cpp index 3b240372f..e548d667b 100644 --- a/src/rendering/hwrenderer/textures/hw_precache.cpp +++ b/src/rendering/hwrenderer/textures/hw_precache.cpp @@ -97,7 +97,7 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap &actorhitl TArray 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 &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(); }