Re: [Interest] How to hide the QSGGeometryNode?
Hi, Il 15/04/19 13:11, Denis Shienkov ha scritto: Yes, now I use this in a form of: boolCurveNode::isSubtreeBlocked()const { returnQSGGeometryNode::isSubtreeBlocked()||!m_visible; } voidCurveNode::setVisible(boolvisible) { if(m_visible==visible) return; m_visible=visible; if(!m_visible) m_dirtyState|=DirtySubtreeBlocked; else m_dirtyState|=DirtyOpacity; } Please make a minimal testcase. The code above seems incomplete (e.g. no calls to markDirty to update those dirty bits). HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: Firma crittografica S/MIME ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] How to hide the QSGGeometryNode?
> Did you try already to use isSubTreeBlocked? Hi. Yes, now I use this in a form of: bool CurveNode::isSubtreeBlocked() const { return QSGGeometryNode::isSubtreeBlocked() || !m_visible; } void CurveNode::setVisible(bool visible) {if (m_visible == visible)return;m_visible = visible; if (!m_visible)m_dirtyState |= DirtySubtreeBlocked;else m_dirtyState |= DirtyOpacity; } but, when I call the setVisible(true) infide of updatePaintNode(), then I got an assert: ASSERT: "shadowNode" in file scenegraph\coreapi\qsgbatchrenderer.cpp, line 1293 and, the node does not appeared again as a visible. пт, 12 апр. 2019 г. в 12:09, Giuseppe D'Angelo via Interest < interest@qt-project.org>: > Hello, > > Il 12/04/19 09:19, Denis Shienkov ha scritto: > > I have an own class, derived from the QQuIckItem. This class contains a > > multiple child QSGGeometryNode-s. Each node has own fragment && vertex > > shader. Each node draws a curves, which are specified by a points set to > > a vertex array. So, I need possibility to hide any selected > > QSGGeometryNode (i.e. do not draw it). > > > > How to do it in a right way? > > Did you try already to use isSubTreeBlocked? > > HTH, > -- > Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer > KDAB (France) S.A.S., a KDAB Group company > Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com > KDAB - The Qt, C++ and OpenGL Experts > > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest > ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] How to hide the QSGGeometryNode?
Hello, Il 12/04/19 09:19, Denis Shienkov ha scritto: I have an own class, derived from the QQuIckItem. This class contains a multiple child QSGGeometryNode-s. Each node has own fragment && vertex shader. Each node draws a curves, which are specified by a points set to a vertex array. So, I need possibility to hide any selected QSGGeometryNode (i.e. do not draw it). How to do it in a right way? Did you try already to use isSubTreeBlocked? HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: Firma crittografica S/MIME ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] How to hide the QSGGeometryNode?
Hi all. I have an own class, derived from the QQuIckItem. This class contains a multiple child QSGGeometryNode-s. Each node has own fragment && vertex shader. Each node draws a curves, which are specified by a points set to a vertex array. So, I need possibility to hide any selected QSGGeometryNode (i.e. do not draw it). How to do it in a right way? BR, Denis ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest