From 75e62eefa5d7db29c82275ba8b1d3e586cda8f12 Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Wed, 26 Sep 2007 16:38:32 +0000 Subject: [PATCH] Apply lod bias only to the window texture svn path=/trunk/KDE/kdebase/workspace/; revision=717334 --- scene_opengl.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index be276b5f21..bbbada198f 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -765,11 +765,6 @@ void SceneOpenGL::Texture::init() void SceneOpenGL::Texture::createTexture() { glGenTextures( 1, &mTexture ); - if( hasGLVersion( 1, 4, 0 )) - { - // Lod bias makes the trilinear-filtered texture look a bit sharper - glTexEnvf( GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, -1.0f ); - } } void SceneOpenGL::Texture::discard() @@ -1038,10 +1033,19 @@ void SceneOpenGL::Texture::bind() glXBindTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT, NULL ); } enableFilter(); + if( hasGLVersion( 1, 4, 0 )) + { + // Lod bias makes the trilinear-filtered texture look a bit sharper + glTexEnvf( GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, -1.0f ); + } } void SceneOpenGL::Texture::unbind() { + if( hasGLVersion( 1, 4, 0 )) + { + glTexEnvf( GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, 0.0f ); + } if( tfp_mode && options->glStrictBinding ) { assert( bound_glxpixmap != None );