diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2010-02-15 11:31:28 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2010-02-15 11:34:42 (GMT) |
commit | 759cd3d04fd46b5acda5e0e388eec3dfc069cdc4 (patch) | |
tree | 7186bbd2bfc38cc272c8684d256f9ad7bae3f948 /src/opengl/qgl_x11.cpp | |
parent | b649ca564a66cc905276f27d2d77cc3bff88d788 (diff) | |
download | Qt-759cd3d04fd46b5acda5e0e388eec3dfc069cdc4.zip Qt-759cd3d04fd46b5acda5e0e388eec3dfc069cdc4.tar.gz Qt-759cd3d04fd46b5acda5e0e388eec3dfc069cdc4.tar.bz2 |
Fixed a GLX warning that occured with some Intel chipsets under X11.
For some reason the Intel GL driver exports the texture_from_pixmap
extension in the GLX server, but not in local clients.
Task-number: related to QTBUG-5732
Reviewed-by: Kim
Diffstat (limited to 'src/opengl/qgl_x11.cpp')
-rw-r--r-- | src/opengl/qgl_x11.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 61a16be..f0b06ef5 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -1656,8 +1656,11 @@ static bool qt_resolveTextureFromPixmap(QPaintDevice *paintDevice) Display *display = xinfo ? xinfo->display() : X11->display; int screen = xinfo ? xinfo->screen() : X11->defaultScreen; - QGLExtensionMatcher extensions(glXQueryExtensionsString(display, screen)); - if (extensions.match("GLX_EXT_texture_from_pixmap")) { + QGLExtensionMatcher serverExtensions(glXQueryExtensionsString(display, screen)); + QGLExtensionMatcher clientExtensions(glXGetClientString(display, GLX_EXTENSIONS)); + if (serverExtensions.match("GLX_EXT_texture_from_pixmap") + && clientExtensions.match("GLX_EXT_texture_from_pixmap")) + { glXBindTexImageEXT = (qt_glXBindTexImageEXT) qglx_getProcAddress("glXBindTexImageEXT"); glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) qglx_getProcAddress("glXReleaseTexImageEXT"); } |