From 942138b307672f552f6137bdcde196a749c2c637 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 May 2016 11:27:52 +0200 Subject: [PATCH] - 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. --- src/gl/textures/gl_material.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gl/textures/gl_material.cpp b/src/gl/textures/gl_material.cpp index 5207ea00d..ee51bb2b9 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -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(tex)->NeedUpdate(); if (lastSampler != clampmode || lastTranslation != translation) lastSampler = GLRenderer->mSamplerManager->Bind(texunit, clampmode, lastSampler);