diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-09-11 08:53:39 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-09-11 10:02:32 (GMT) |
commit | 47d6e83659f23de6bf4d0a37cb30c325dcacefc1 (patch) | |
tree | 20da1832e85f94033b6228f2ab1478b4159dcf95 /src/opengl | |
parent | e59d4e9f0b147409a8a2732ee3f29f8e7768349a (diff) | |
download | Qt-47d6e83659f23de6bf4d0a37cb30c325dcacefc1.zip Qt-47d6e83659f23de6bf4d0a37cb30c325dcacefc1.tar.gz Qt-47d6e83659f23de6bf4d0a37cb30c325dcacefc1.tar.bz2 |
Fixed clipping bugs in GL2 graphics system with oxygen style.
QGL2PaintEngineEx::clip() needs to call ensureActive() to make sure the
engine is active and synced before doing any clipping operations. We
also need to set needsSync to false before entering setState() since
otherwise we end up in an infinite loop in the case where
replayClipOperations() again calls QGL2PaintEngineEx::clip().
Reviewed-by: Tom
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 4427ee9..e32bbbd 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1405,8 +1405,8 @@ void QGL2PaintEngineEx::ensureActive() glViewport(0, 0, d->width, d->height); glDepthMask(false); glDepthFunc(GL_LESS); - setState(state()); d->needsSync = false; + setState(state()); } } @@ -1519,6 +1519,8 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op) // qDebug("QGL2PaintEngineEx::clip()"); Q_D(QGL2PaintEngineEx); + ensureActive(); + if (op == Qt::ReplaceClip && !d->hasClipOperations()) op = Qt::IntersectClip; |