diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-07-23 07:46:23 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-07-23 11:28:36 (GMT) |
commit | 699d74a9fae0b2d03e5c74bfb9590f6f0809ef4e (patch) | |
tree | b5a5b787558e74497b84dbcd73ff614e7642630f /src/opengl/qgl_qpa.cpp | |
parent | be08fbc13f7370b6cc0c34660b4d1c16e4fdd3f5 (diff) | |
download | Qt-699d74a9fae0b2d03e5c74bfb9590f6f0809ef4e.zip Qt-699d74a9fae0b2d03e5c74bfb9590f6f0809ef4e.tar.gz Qt-699d74a9fae0b2d03e5c74bfb9590f6f0809ef4e.tar.bz2 |
Make it possible to have shared contexts to Lighthouse
This adds a getter to QPlatformGLContext for the "default shared
context". The setter is protected as it is the plugins responsibillity
to create it or not. QPlatformWindowFormat has also gotten a pointer to
a QPlatformGLContext for a non default shared context. Only implemented
shared contexts in testlite for now.
Diffstat (limited to 'src/opengl/qgl_qpa.cpp')
-rw-r--r-- | src/opengl/qgl_qpa.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index aa124fe..0fc885c 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -66,6 +66,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) }else { QWidget *widget = static_cast<QWidget *>(d->paintDevice); if (!widget->platformWindow()){ + QPlatformWindowFormat format = widget->platformWindowFormat(); + format.setWindowApi(QPlatformWindowFormat::OpenGL); + widget->setPlatformWindowFormat(format); widget->winId();//make window } d->platformContext = widget->platformWindow()->glContext(); |