path: root/src/opengl/qgl.h
diff options
authorSamuel Rødal <>2011-06-07 17:25:22 +0200
committerSamuel Rødal <>2011-06-10 09:24:56 +0200
commit4a189c188ccd2fb5f8d1d5ddadf06cbd6bc0916f (patch)
tree99bff9f015e869b5521836ea5667590939b22a53 /src/opengl/qgl.h
parent4d10e64f2a78e32418a98e1c80c6579ae0779dfc (diff)
QWindowContext / QWindowFormat refactor.
To enable having a single GL context used for multiple drawables we need to de-couple the context class a bit more from the window class in the plugin API. Now contexts are created stand-alone based on a GL format and a share context, and when calling makeCurrent() a desired surface is specified. This maps well to GLX, EGL, Cocoa, AGL, and WGL, which all support this use case. QWindowContext is renamed to QGuiGLContext, and QWindowFormat is renamed to QGuiGLFormat. We have the ability to introduce a pbuffer or similar other offscreen GL drawable abstraction in the future.
Diffstat (limited to 'src/opengl/qgl.h')
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 7e151184c8..7b0a237e83 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -49,7 +49,7 @@
#include <QtCore/qscopedpointer.h>
#ifdef Q_WS_QPA
-#include <QtGui/QWindowFormat>
+#include <QtGui/QGuiGLFormat>
@@ -283,8 +283,8 @@ public:
static OpenGLVersionFlags openGLVersionFlags();
#if defined(Q_WS_QPA)
- static QGLFormat fromWindowFormat(const QWindowFormat &format);
- static QWindowFormat toWindowFormat(const QGLFormat &format);
+ static QGLFormat fromGuiGLFormat(const QGuiGLFormat &format);
+ static QGuiGLFormat toGuiGLFormat(const QGLFormat &format);
QGLFormatPrivate *d;
@@ -397,7 +397,7 @@ public:
static const QGLContext* currentContext();
#ifdef Q_WS_QPA
- static QGLContext *fromWindowContext(QWindowContext *platformContext);
+ static QGLContext *fromGuiGLContext(QGuiGLContext *platformContext);
virtual bool chooseContext(const QGLContext* shareContext = 0);
@@ -429,7 +429,7 @@ protected:
#ifdef Q_WS_QPA
- QGLContext(QWindowContext *windowContext);
+ QGLContext(QGuiGLContext *windowContext);
QScopedPointer<QGLContextPrivate> d_ptr;