diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-02-18 14:08:06 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-02-18 13:23:33 +0000 |
commit | c9690153248f1cc8842e97472721bd22e411ada8 (patch) | |
tree | cc30241ceb355dcc523461819c559552aeb3dde2 | |
parent | 02b6eb87823d4f3b8217456d389912f73df007af (diff) |
Reset the active texture cache in beginDrawing
When using Scene3D the context is shared with the Qt Quick scenegraph
and the state can be changed arbitrarily between Qt3D updates. Caching
the state is therefore not an option between frames.
This fixes texture usage in apps using Scene3D and Qt Quick controls.
Change-Id: Ifc67171af5209499bfdd4474230d59f03e22889d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r-- | src/render/backend/qgraphicscontext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render/backend/qgraphicscontext.cpp b/src/render/backend/qgraphicscontext.cpp index 7145d5451..3b0df7691 100644 --- a/src/render/backend/qgraphicscontext.cpp +++ b/src/render/backend/qgraphicscontext.cpp @@ -161,6 +161,8 @@ bool QGraphicsContext::beginDrawing(QSurface *surface, const QColor &clearColor) if (m_activeShader) m_activeShader = NULL; + m_activeTextures.fill(0); + return true; } |