summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11egl.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-08-28 12:07:20 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-08-28 12:07:20 (GMT)
commit7c2620578ba0698a14c1d4ff5c7a4e260f06ad31 (patch)
treeedb83c85af4bdc12a8230834a10f8e90b4b9ee2e /src/opengl/qgl_x11egl.cpp
parent0ba973c885257941800e895aacc387904d1737ef (diff)
downloadQt-7c2620578ba0698a14c1d4ff5c7a4e260f06ad31.zip
Qt-7c2620578ba0698a14c1d4ff5c7a4e260f06ad31.tar.gz
Qt-7c2620578ba0698a14c1d4ff5c7a4e260f06ad31.tar.bz2
Attempting to make EGL compile again and fix some potential
issues with flipped pixmaps on X11
Diffstat (limited to 'src/opengl/qgl_x11egl.cpp')
-rw-r--r--src/opengl/qgl_x11egl.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index b982a19..f40cdc9 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -490,12 +490,13 @@ void QGLWidgetPrivate::recreateEglSurface(bool force)
}
-QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, const qint64 key, bool canInvert)
+QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, const qint64 key,
+ QGLContext::BindOptions options)
{
Q_Q(QGLContext);
// The EGL texture_from_pixmap has no facility to invert the y coordinate
- if (!canInvert)
+ if (!(options & QGLContext::CanFlipNativePixmapBindOption))
return 0;
Q_ASSERT(pd->classId() == QPixmapData::X11Class);
@@ -623,7 +624,10 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons
return 0;
}
- QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, canInvert, true);
+ // Always inverted because the opposite is not supported...
+ options |= QGLContext::InvertedYBindOption;
+
+ QGLTexture *texture = new QGLTexture(q, textureId, GL_TEXTURE_2D, options);
pixmapData->flags |= QX11PixmapData::InvertedWhenBoundToTexture;
// We assume the cost of bound pixmaps is zero