Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qssgrenderroot_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
6
#
ifndef
QSSGRENDERROOT_P_H
7
#
define
QSSGRENDERROOT_P_H
8
9
//
10
// W A R N I N G
11
// -------------
12
//
13
// This file is not part of the Qt API. It exists purely as an
14
// implementation detail. This header file may change from version to
15
// version without notice, or even be removed.
16
//
17
// We mean it.
18
//
19
20
#
include
<
QtQuick3DRuntimeRender
/
private
/
qssgrendernode_p
.
h
>
21
22
#
include
<
QtGui
/
qmatrix4x4
.
h
>
23
24
#
include
<
memory
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QSSGGlobalRenderNodeData;
29
30
class
Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderRoot final :
public
QSSGRenderNode
31
{
32
public
:
33
QSSGRenderRoot();
34
~QSSGRenderRoot();
35
36
using
VersionType = QSSGRenderNodeVersionType;
37
38
enum
class
DirtyFlag : quint8
39
{
40
TreeDirty = 0x1
41
};
42
using
FlagT = std::underlying_type_t<DirtyFlag>;
43
44
static
constexpr
DirtyFlag DirtyMask { std::numeric_limits<FlagT>::max() };
45
46
[[nodiscard]]
bool
isDirty(DirtyFlag dirtyFlag = DirtyMask)
const
47
{
48
return
((m_rootDirtyFlags & FlagT(dirtyFlag)) != 0)
49
|| ((dirtyFlag == DirtyMask) && QSSGRenderNode::isDirty());
50
}
51
void
markDirty(DirtyFlag dirtyFlag);
52
void
clearDirty(DirtyFlag dirtyFlag);
53
54
[[nodiscard]]
const
std::shared_ptr<QSSGGlobalRenderNodeData> &globalNodeData()
const
55
{
56
return
m_gnd;
57
}
58
59
// This is the starting point when indexing the nodes.
60
// By default it is 0, which means the first version when
61
// indexing will be 1. The start version can be set to a
62
// different value when needed. For example we'll set this
63
// to the last version of the layer node when the window
64
// changes, as that avoids accidentally re-using the same
65
// version when re-indexing the layer node, as that can cause
66
// issues.
67
void
setStartVersion(VersionType startVersion)
68
{
69
m_startVersion = startVersion;
70
}
71
72
[[nodiscard]] VersionType startVersion()
const
73
{
74
return
m_startVersion;
75
}
76
77
[[nodiscard]]
static
QSSGRenderRoot *get(QSSGRenderRoot **ref)
78
{
79
return
(ref && *ref) ? *ref :
nullptr
;
80
}
81
82
void
reindex();
83
84
private
:
85
QSSGRenderRoot *self =
this
;
86
VersionType m_startVersion = 0;
87
std::shared_ptr<QSSGGlobalRenderNodeData> m_gnd;
88
FlagT m_rootDirtyFlags = FlagT(DirtyFlag::TreeDirty);
89
};
90
91
QT_END_NAMESPACE
92
93
#
endif
// QSSGRENDERROOT_P_H
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtquick3d
src
runtimerender
graphobjects
qssgrenderroot_p.h
Generated on
for Qt by
1.18.0