summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgraphicssystem_gl.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-10-13 12:21:51 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-10-19 12:56:39 (GMT)
commit0d0cba294980c5fbb26a2fd3e930c94606e93d03 (patch)
treeb48b45dc8f4014d519950b351b6b6680dfc59f04 /src/opengl/qgraphicssystem_gl.cpp
parent22b9079040ae0d4f35781509fa6aea7e38ac47bb (diff)
downloadQt-0d0cba294980c5fbb26a2fd3e930c94606e93d03.zip
Qt-0d0cba294980c5fbb26a2fd3e930c94606e93d03.tar.gz
Qt-0d0cba294980c5fbb26a2fd3e930c94606e93d03.tar.bz2
Add a new QX11GLPixmapData which renders to X pixmaps using GL
Enable it by setting QT_USE_X11GL_PIXMAPS environment variable while using the -graphicssystem opengl
Diffstat (limited to 'src/opengl/qgraphicssystem_gl.cpp')
-rw-r--r--src/opengl/qgraphicssystem_gl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/opengl/qgraphicssystem_gl.cpp b/src/opengl/qgraphicssystem_gl.cpp
index 3e7fece..60d58a7 100644
--- a/src/opengl/qgraphicssystem_gl.cpp
+++ b/src/opengl/qgraphicssystem_gl.cpp
@@ -47,12 +47,21 @@
#include "private/qgl_p.h"
#include <private/qwindowsurface_raster_p.h>
+#ifdef Q_WS_X11
+#include "private/qpixmapdata_x11gl_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
extern QGLWidget *qt_gl_getShareWidget();
QPixmapData *QGLGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
{
+#ifdef Q_WS_X11
+ if (type == QPixmapData::PixmapType && QX11GLPixmapData::hasX11GLPixmaps())
+ return new QX11GLPixmapData();
+#endif
+
return new QGLPixmapData(type);
}