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
This commit is contained in:
Rivo Laks 2007-04-21 15:04:37 +00:00
parent 868719ed65
commit ec29f33832

View file

@ -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;
}