From eb4fb38657205e7d0c0b67dc987a8723c46d6b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 30 May 2007 13:55:29 +0000 Subject: [PATCH] Have a separate list for glx extensions, to avoid mistakes - now initGL() is called after initGLX(), so the glx extensions are reset. svn path=/trunk/KDE/kdebase/workspace/; revision=669818 --- lib/kwinglutils.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index ba5f69422c..57f04d399d 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -36,6 +36,7 @@ static int glVersion; static int glXVersion; // List of all supported GL and GLX extensions static QStringList glExtensions; +static QStringList glxExtensions; int glTextureUnitsCount; @@ -47,8 +48,8 @@ void initGLX() int major, minor; glXQueryVersion( display(), &major, &minor ); glXVersion = MAKE_GL_VERSION( major, minor, 0 ); - // Get list of supported GLX extensions. Simply add it to the list of OpenGL extensions. - glExtensions += QString((const char*)glXQueryExtensionsString( + // Get list of supported GLX extensions + glxExtensions = QString((const char*)glXQueryExtensionsString( display(), DefaultScreen( display()))).split(" "); glxResolveFunctions(); @@ -84,7 +85,7 @@ bool hasGLXVersion(int major, int minor, int release) bool hasGLExtension(const QString& extension) { - return glExtensions.contains(extension); + return glExtensions.contains(extension) || glxExtensions.contains(extension); } void checkGLError( const char* txt )