- fixed caching of texture sampler state for old hardware.

- fixed handling of CLAMP_XY_NOMIP sampler mode. This cannot be lumped together with CLAMP_XY because it has different mipmap requirements.
This commit is contained in:
Christoph Oelckers 2016-05-03 13:39:41 +02:00
commit 0e14f00b51
4 changed files with 17 additions and 15 deletions

View file

@ -346,7 +346,8 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int clampmode, int transla
delete[] buffer;
}
if (tex->bHasCanvas) static_cast<FCanvasTexture*>(tex)->NeedUpdate();
if (lastSampler != clampmode || lastTranslation != translation)
if (translation != lastTranslation) lastSampler = 254;
if (lastSampler != clampmode)
lastSampler = GLRenderer->mSamplerManager->Bind(texunit, clampmode, lastSampler);
lastTranslation = translation;
return hwtex;