- undid some leftover texture state checks from the first attempt to handle this without sampler objects.

This code was written under the assumption that the glGenerateMipmap function does not exist. But all supported hardware has this function through the GL_EXT_framebuffer_object extension.
This commit is contained in:
Christoph Oelckers 2016-05-03 11:27:52 +02:00
parent 6f2b0a6293
commit 942138b307

View file

@ -300,7 +300,7 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int clampmode, int transla
translation = GLTranslationPalette::GetInternalTranslation(translation);
}
bool needmipmap = (clampmode <= CLAMP_XY) || !(gl.flags & RFL_SAMPLER_OBJECTS);
bool needmipmap = (clampmode <= CLAMP_XY);
FHardwareTexture *hwtex = CreateHwTexture();
@ -345,7 +345,6 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int clampmode, int transla
}
delete[] buffer;
}
if (!needmipmap) clampmode = CLAMP_XY_NOMIP;
if (tex->bHasCanvas) static_cast<FCanvasTexture*>(tex)->NeedUpdate();
if (lastSampler != clampmode || lastTranslation != translation)
lastSampler = GLRenderer->mSamplerManager->Bind(texunit, clampmode, lastSampler);