summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglcontext.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-03-17 10:35:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-24 09:10:29 +0200
commitaf1e32426c50694c0e4c1c292aa5eeee3b38c7bc (patch)
tree041b8176b646e059b4a2cece890ac33fc1388a39 /src/gui/kernel/qopenglcontext.h
parent787692a09ee3e7e224ddb36b2c602bc3c37e9fab (diff)
Add public and QPA APIs for adapting existing OpenGL contexts
For now only xcb on GLX is supported. Other platforms will follow later. Add also some missing documentation for the platform OpenGL context factory functions. [ChangeLog] QOpenGLContext is now able to adopt existing native contexts. Task-number: QTBUG-37552 Change-Id: I5dd959f102df178f646b2df5989203b5dc6de376 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/kernel/qopenglcontext.h')
-rw-r--r--src/gui/kernel/qopenglcontext.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index fce983f975..736ae0c0b4 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.h
@@ -64,6 +64,7 @@
#include <QtCore/qhash.h>
#include <QtCore/qpair.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_NAMESPACE
@@ -153,6 +154,7 @@ public:
void setFormat(const QSurfaceFormat &format);
void setShareContext(QOpenGLContext *shareContext);
void setScreen(QScreen *screen);
+ void setNativeHandle(const QVariant &handle);
bool create();
bool isValid() const;
@@ -161,6 +163,7 @@ public:
QOpenGLContext *shareContext() const;
QOpenGLContextGroup *shareGroup() const;
QScreen *screen() const;
+ QVariant nativeHandle() const;
GLuint defaultFramebufferObject() const;
@@ -242,4 +245,4 @@ QT_END_NAMESPACE
#endif // QT_NO_OPENGL
-#endif // QGUIGLCONTEXT_H
+#endif // QOPENGLCONTEXT_H