diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-07-29 06:45:10 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-07-29 06:45:10 (GMT) |
commit | 77bd318b2892ad2a6beefee84c8e1436f4f7f386 (patch) | |
tree | 0de55e09200679501da73babed5cce1d4b558781 /src/opengl | |
parent | 7eba68adc4a7862d9474179592e5c8393a7acdbb (diff) | |
parent | d22d08f3f8a70edfc66c0f6c2fd952688b64fcc2 (diff) | |
download | Qt-77bd318b2892ad2a6beefee84c8e1436f4f7f386.zip Qt-77bd318b2892ad2a6beefee84c8e1436f4f7f386.tar.gz Qt-77bd318b2892ad2a6beefee84c8e1436f4f7f386.tar.bz2 |
Merge commit 'qt/master-stable'
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl_x11.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index a95b7a0..6381bc2 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -1536,15 +1536,21 @@ void QGLExtensions::init() } } - +#if !defined(glXBindTexImageEXT) typedef void (*qt_glXBindTexImageEXT)(Display*, GLXDrawable, int, const int*); -typedef void (*qt_glXReleaseTexImageEXT)(Display*, GLXDrawable, int); static qt_glXBindTexImageEXT glXBindTexImageEXT = 0; +#endif +#if !defined(glXReleaseTexImageEXT) +typedef void (*qt_glXReleaseTexImageEXT)(Display*, GLXDrawable, int); static qt_glXReleaseTexImageEXT glXReleaseTexImageEXT = 0; +#endif 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) @@ -1559,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; @@ -1644,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); |