diff options
Diffstat (limited to 'src/gui/kernel/qguiglcontext_qpa.h')
-rw-r--r-- | src/gui/kernel/qguiglcontext_qpa.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gui/kernel/qguiglcontext_qpa.h b/src/gui/kernel/qguiglcontext_qpa.h index 9e62905b68..db3d6f29e6 100644 --- a/src/gui/kernel/qguiglcontext_qpa.h +++ b/src/gui/kernel/qguiglcontext_qpa.h @@ -61,24 +61,30 @@ class Q_GUI_EXPORT QGuiGLContext { Q_DECLARE_PRIVATE(QGuiGLContext); public: - QGuiGLContext(const QSurfaceFormat &format = QSurfaceFormat(), QGuiGLContext *shareContext = 0); + QGuiGLContext(); ~QGuiGLContext(); + void setFormat(const QSurfaceFormat &format); + void setShareContext(QGuiGLContext *shareContext); + void setScreen(QScreen *screen); + + bool create(); bool isValid() const; + QSurfaceFormat format() const; + QGuiGLContext *shareContext() const; + QScreen *screen() const; + bool makeCurrent(QSurface *surface); void doneCurrent(); void swapBuffers(QSurface *surface); void (*getProcAddress(const QByteArray &procName)) (); - QSurfaceFormat format() const; - - QGuiGLContext *shareContext() const; - static QGuiGLContext *currentContext(); QPlatformGLContext *handle() const; + QPlatformGLContext *shareHandle() const; private: QScopedPointer<QGuiGLContextPrivate> d_ptr; @@ -91,6 +97,8 @@ private: void setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *)); void deleteQGLContext(); + void destroy(); + Q_DISABLE_COPY(QGuiGLContext); }; |