28class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderRoot final :
public QSSGRenderNode
34 enum class DirtyFlag : quint8
38 using FlagT = std::underlying_type_t<DirtyFlag>;
40 static constexpr DirtyFlag DirtyMask { std::numeric_limits<FlagT>::max() };
42 [[nodiscard]]
bool isDirty(DirtyFlag dirtyFlag = DirtyMask)
const
44 return ((m_rootDirtyFlags & FlagT(dirtyFlag)) != 0)
45 || ((dirtyFlag == DirtyMask) && QSSGRenderNode::isDirty());
47 void markDirty(DirtyFlag dirtyFlag);
48 void clearDirty(DirtyFlag dirtyFlag);
50 [[nodiscard]]
const std::shared_ptr<QSSGGlobalRenderNodeData> &globalNodeData()
const
63 void setStartVersion(quint32 startVersion)
65 m_startVersion = startVersion;
68 [[nodiscard]] quint32 startVersion()
const
70 return m_startVersion;
73 [[nodiscard]]
static QSSGRenderRoot *get(QSSGRenderRoot **ref)
75 return (ref && *ref) ? *ref :
nullptr;
81 QSSGRenderRoot *self =
this;
82 quint32 m_startVersion = 0;
83 std::shared_ptr<QSSGGlobalRenderNodeData> m_gnd;
84 FlagT m_rootDirtyFlags = FlagT(DirtyFlag::TreeDirty);