summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-07-28 06:21:32 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-07-28 06:21:32 (GMT)
commite498880396d44c90e46308e2fa5903b51f9f4132 (patch)
treee717d43538edfa995c6cc55318df69db3a516609 /src/opengl/qgl_x11.cpp
parent6559c780893264b18a74fce42584cc1345363ef8 (diff)
downloadQt-e498880396d44c90e46308e2fa5903b51f9f4132.zip
Qt-e498880396d44c90e46308e2fa5903b51f9f4132.tar.gz
Qt-e498880396d44c90e46308e2fa5903b51f9f4132.tar.bz2
Disable Texture-From-Pixmap on everything other than Linux
Diffstat (limited to 'src/opengl/qgl_x11.cpp')
-rw-r--r--src/opengl/qgl_x11.cpp7
1 files changed, 6 insertions, 1 deletions
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);