Forward port rev 1167908

Revert rev 1137490: it caused compositing not working with legacy NVIDIA drivers and might be responsible for freezes when changing config.
It can be reverted as there is already a better fix for buggy drivers present in 4.5.1.
Did I mention that I love drivers?
CCBUG: 243991
CCBUG: 241402

svn path=/trunk/KDE/kdebase/workspace/; revision=1167909
This commit is contained in:
Martin Gräßlin 2010-08-25 17:00:36 +00:00
parent dd003d527f
commit 22bbd02a03

View file

@ -905,26 +905,6 @@ bool GLRenderTarget::mSupported = false;
void GLRenderTarget::initStatic()
{
mSupported = hasGLExtension("GL_EXT_framebuffer_object") && glFramebufferTexture2D;
if( mSupported )
{
// some drivers claim to support the extension, but fail to return a complete FBO (see Bug 240956)
// generate a FBO and test if it is valid. If it isn't valid there's no need to claim that FBO's are supported
int w = displayWidth();
int h = displayHeight();
if ( !GLTexture::NPOTTextureSupported() )
{
w = nearestPowerOfTwo( w );
h = nearestPowerOfTwo( h );
}
GLTexture* tex = new GLTexture( w, h );
tex->setFilter( GL_LINEAR );
tex->setWrapMode( GL_CLAMP_TO_EDGE );
GLRenderTarget* target = new GLRenderTarget( tex );
if( !target->valid() )
mSupported = false;
delete target;
delete tex;
}
}
GLRenderTarget::GLRenderTarget(GLTexture* color)