1// Copyright (C) 2019 Ford Motor Company
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "subtreeenabler_p.h"
5#include <Qt3DRender/private/qsubtreeenabler_p.h>
6
7QT_BEGIN_NAMESPACE
8
9namespace Qt3DRender {
10
11namespace Render {
12
13SubtreeEnabler::SubtreeEnabler()
14 : FrameGraphNode(FrameGraphNode::SubtreeEnabler, FrameGraphNode::ReadWrite)
15{
16}
17
18void SubtreeEnabler::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime)
19{
20 const QSubtreeEnabler *node = qobject_cast<const QSubtreeEnabler *>(object: frontEnd);
21 if (!node)
22 return;
23
24 FrameGraphNode::syncFromFrontEnd(frontEnd, firstTime);
25
26 const auto enablement = node->enablement();
27 if (enablement != m_enablement) {
28 m_enablement = enablement;
29 markDirty(changes: AbstractRenderer::FrameGraphDirty);
30 }
31}
32
33} //Render
34
35} //Qt3DRender
36
37QT_END_NAMESPACE
38

source code of qt3d/src/render/framegraph/subtreeenabler.cpp