From ec29f33832bc158493292969a046d936770597ee Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Sat, 21 Apr 2007 15:04:37 +0000 Subject: [PATCH] Make enable/disableUnnormalizedTexCoords() work with custom textures (e.g. rendertarget ones). Make texture dirty when enabling rendertarget. svn path=/branches/work/kwin_composite/; revision=656496 --- lib/kwinglutils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index 9f7b8e4517..178fb2b1d4 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -153,8 +153,8 @@ GLTexture::GLTexture( int width, int height ) if( NPOTTextureSupported() || ( isPowerOfTwo( width ) && isPowerOfTwo( height ))) { mTarget = GL_TEXTURE_2D; - mScale.setWidth( 1.0 ); - mScale.setHeight( 1.0 ); + mScale.setWidth( 1.0 / width); + mScale.setHeight( 1.0 / height); can_use_mipmaps = true; glGenTextures( 1, &mTexture ); @@ -652,6 +652,7 @@ bool GLRenderTarget::enable() } glBindFramebuffer(GL_FRAMEBUFFER_EXT, mFramebuffer); + mTexture->setDirty(); return true; }