From cb81e113751d27aed7685d001b7661b00ecd228d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 13 Mar 2013 16:48:40 +0100 Subject: [PATCH] kwin: Fix FBO function resolution for core contexts --- libkwineffects/kwinglutils.cpp | 4 ++-- libkwineffects/kwinglutils_funcs.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp index 2bf38bd52c..ac471fba1d 100644 --- a/libkwineffects/kwinglutils.cpp +++ b/libkwineffects/kwinglutils.cpp @@ -940,8 +940,8 @@ void GLRenderTarget::initStatic() sSupported = true; s_blitSupported = false; #else - sSupported = hasGLExtension("GL_EXT_framebuffer_object") && glFramebufferTexture2D; - s_blitSupported = hasGLExtension("GL_EXT_framebuffer_blit"); + sSupported = hasGLVersion(3, 0) || hasGLExtension("GL_ARB_framebuffer_object") || hasGLExtension("GL_EXT_framebuffer_object"); + s_blitSupported = hasGLVersion(3, 0) || hasGLExtension("GL_ARB_framebuffer_object") || hasGLExtension("GL_EXT_framebuffer_blit"); #endif } diff --git a/libkwineffects/kwinglutils_funcs.cpp b/libkwineffects/kwinglutils_funcs.cpp index 134448b1ac..156221dcae 100644 --- a/libkwineffects/kwinglutils_funcs.cpp +++ b/libkwineffects/kwinglutils_funcs.cpp @@ -242,7 +242,7 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface) glTextureUnitsCount = 0; } - if (hasGLExtension("GL_ARB_framebuffer_object")) { + if (hasGLVersion(3, 0) || hasGLExtension("GL_ARB_framebuffer_object")) { // see http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt GL_RESOLVE(glIsRenderbuffer); GL_RESOLVE(glBindRenderbuffer); @@ -316,7 +316,7 @@ void glResolveFunctions(OpenGLPlatformInterface platformInterface) glGenerateMipmap = NULL; } - if (hasGLExtension("GL_ARB_framebuffer_object")) { + if (hasGLVersion(3, 0) || hasGLExtension("GL_ARB_framebuffer_object")) { // see http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt GL_RESOLVE(glBlitFramebuffer); } else if (hasGLExtension("GL_EXT_framebuffer_blit")) {