diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-08-31 09:14:00 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-08-31 09:26:48 +0200 |
commit | a7d682dd9c9271d137d5aa73a9192a812492a596 (patch) | |
tree | 8d0f7eef51800d55441f26bcb87ee85be1f6c46d /examples | |
parent | df0ff8fd4eeb5a3a84c86729f3b1f013eedd1680 (diff) | |
download | qtbase-a7d682dd9c9271d137d5aa73a9192a812492a596.tar.gz |
Fixed hellowindow making context current in wrong thread.
Make the context a child of the Renderer, which is already moved to the
correct thread.
Change-Id: Iafda090e15b322c03e2c10b1905050f636b90197
Reviewed-on: http://codereview.qt.nokia.com/3915
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/opengl/hellowindow/hellowindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp index cc1f52a92c..10d9d346a6 100644 --- a/examples/opengl/hellowindow/hellowindow.cpp +++ b/examples/opengl/hellowindow/hellowindow.cpp @@ -10,7 +10,7 @@ Renderer::Renderer(const QSurfaceFormat &format, Renderer *share) : m_initialized(false) , m_format(format) { - m_context = new QOpenGLContext; + m_context = new QOpenGLContext(this); m_context->setFormat(format); if (share) m_context->setShareContext(share->m_context); |