diff options
Diffstat (limited to 'customcontext/renderer/qsgbasicclipmanager_p.h')
-rw-r--r-- | customcontext/renderer/qsgbasicclipmanager_p.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/customcontext/renderer/qsgbasicclipmanager_p.h b/customcontext/renderer/qsgbasicclipmanager_p.h index e75d5a9..76c06d0 100644 --- a/customcontext/renderer/qsgbasicclipmanager_p.h +++ b/customcontext/renderer/qsgbasicclipmanager_p.h @@ -78,6 +78,15 @@ public: template<typename ClipRenderer, typename ShaderStateTracker> void activate(const QSGClipNode *clip, ClipRenderer *clipRenderer, ShaderStateTracker *tracker, QOpenGLFunctions *gl); + void reset(QOpenGLFunctions *gl) { + if (m_clipType & StencilClip) + gl->glDisable(GL_STENCIL_TEST); + if (m_clipType & ScissorClip) + gl->glDisable(GL_SCISSOR_TEST); + m_clipType = NoClip; + m_currentClip = 0; + } + ClipType clipType() const { return m_clipType; } const QSGClipNode *currentClip() const { return m_currentClip; } |