From e498880396d44c90e46308e2fa5903b51f9f4132 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 28 Jul 2009 08:21:32 +0200 Subject: Disable Texture-From-Pixmap on everything other than Linux --- src/opengl/qgl_x11.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index a76059c..6381bc2 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -1548,6 +1548,9 @@ static bool qt_resolved_texture_from_pixmap = false; QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pm, const qint64 key, bool canInvert) { +#if !defined(Q_OS_LINUX) + return 0; +#else Q_Q(QGLContext); if (pm->data_ptr()->classId() != QPixmapData::X11Class) @@ -1562,6 +1565,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pm, const qi !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0)) return 0; + if (!qt_resolved_texture_from_pixmap) { qt_resolved_texture_from_pixmap = true; @@ -1647,11 +1651,12 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pm, const qi return texture; #endif //!defined(GLX_VERSION_1_3) || defined(Q_OS_HPUX) +#endif //!defined(Q_OS_LINUX } void QGLTexture::deleteBoundPixmap() { -#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) +#if defined(GLX_VERSION_1_3) && !defined(Q_OS_HPUX) && defined(Q_OS_LINUX) if (boundPixmap) { glXReleaseTexImageEXT(QX11Info::display(), boundPixmap, GLX_FRONT_LEFT_EXT); glXDestroyPixmap(QX11Info::display(), boundPixmap); -- cgit v0.12