summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformglcontext_qpa.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-04-26 16:21:58 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-04-28 15:38:51 +0200
commitef77e8b65149a29a541044239fccf5e14b95e94d (patch)
tree8182a140efbb517407f1039b6795c67819a31405 /src/gui/kernel/qplatformglcontext_qpa.h
parentfbef41167aa4aede67bc1ec904142e2e5e12c7fc (diff)
Added QWindowContext and got wiggly up and running with xcb.
(cherry picked from commit c980e4ef4ebc7699a6c3a7529d3f08ebafc21ffe)
Diffstat (limited to 'src/gui/kernel/qplatformglcontext_qpa.h')
-rw-r--r--src/gui/kernel/qplatformglcontext_qpa.h33
1 files changed, 7 insertions, 26 deletions
diff --git a/src/gui/kernel/qplatformglcontext_qpa.h b/src/gui/kernel/qplatformglcontext_qpa.h
index 5a22bc769a..fbd43b2b48 100644
--- a/src/gui/kernel/qplatformglcontext_qpa.h
+++ b/src/gui/kernel/qplatformglcontext_qpa.h
@@ -43,7 +43,7 @@
#define QPLATFORM_GL_CONTEXT_H
#include <QtCore/qnamespace.h>
-#include <QtGui/QWindowFormat>
+#include <QtGui/qwindowformat_qpa.h>
QT_BEGIN_HEADER
@@ -51,36 +51,17 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
-class QPlatformGLContextPrivate;
-
-class Q_OPENGL_EXPORT QPlatformGLContext
+class Q_GUI_EXPORT QPlatformGLContext
{
-Q_DECLARE_PRIVATE(QPlatformGLContext);
-
public:
- explicit QPlatformGLContext();
- virtual ~QPlatformGLContext();
+ virtual ~QPlatformGLContext() {}
- virtual void makeCurrent();
- virtual void doneCurrent();
+ virtual void makeCurrent() = 0;
+ virtual void doneCurrent() = 0;
virtual void swapBuffers() = 0;
- virtual void* getProcAddress(const QString& procName) = 0;
+ virtual void *getProcAddress(const QString& procName) = 0;
virtual QWindowFormat windowFormat() const = 0;
-
- const static QPlatformGLContext *currentContext();
-
-protected:
- QScopedPointer<QPlatformGLContextPrivate> d_ptr;
-
-private:
- //hack to make it work with QGLContext::CurrentContext
- friend class QGLContext;
- friend class QWidgetPrivate;
- void *qGLContextHandle() const;
- void setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *));
- void deleteQGLContext();
- Q_DISABLE_COPY(QPlatformGLContext);
};
QT_END_NAMESPACE
@@ -88,4 +69,4 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QPLATFORM_GL_INTEGRATION_P_H
+#endif // QPLATFORM_GL_CONTEXT_H