diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2014-12-16 12:56:00 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2014-12-17 10:17:12 +0100 |
commit | 92a1c1f60c637c211cd16cbe7ea9cbc663da1013 (patch) | |
tree | e4197c59d6ebf748566e366f278f431ca141cb8d /examples | |
parent | b10570d6498c0789d81cd287a5c1165d9a23d257 (diff) |
rendercontrol example: Add missing flushes
Otherwise we will show broken output with some drivers.
QQuickWidget does this already.
Change-Id: I5193595c4606d0497dbe85f6f8c670618ca366e9
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/rendercontrol/window_multithreaded.cpp | 1 | ||||
-rw-r--r-- | examples/quick/rendercontrol/window_singlethreaded.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/examples/quick/rendercontrol/window_multithreaded.cpp b/examples/quick/rendercontrol/window_multithreaded.cpp index b59b0f59da..ad261848bf 100644 --- a/examples/quick/rendercontrol/window_multithreaded.cpp +++ b/examples/quick/rendercontrol/window_multithreaded.cpp @@ -188,6 +188,7 @@ void QuickRenderer::render(QMutexLocker *lock) // Meanwhile on this thread continue with the actual rendering (into the FBO first). m_renderControl->render(); + m_context->functions()->glFlush(); // The cube renderer uses its own context, no need to bother with the state here. diff --git a/examples/quick/rendercontrol/window_singlethreaded.cpp b/examples/quick/rendercontrol/window_singlethreaded.cpp index 993c508c0a..c72d11ade5 100644 --- a/examples/quick/rendercontrol/window_singlethreaded.cpp +++ b/examples/quick/rendercontrol/window_singlethreaded.cpp @@ -165,6 +165,8 @@ void WindowSingleThreaded::render() m_quickWindow->resetOpenGLState(); QOpenGLFramebufferObject::bindDefault(); + m_context->functions()->glFlush(); + m_quickReady = true; // Get something onto the screen. |