Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquick3deffect_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QQUICK3DEFFECT_H
5#define QQUICK3DEFFECT_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick3D/qtquick3dglobal.h>
19#include <QtQuick3D/private/qquick3dobject_p.h>
20#include <QtQuick3D/private/qquick3dtexture_p.h>
21
22#include <QtQuick3DUtils/private/qssgrenderbasetypes_p.h>
23
24#include <QtQuick3DRuntimeRender/private/qssgrendercommands_p.h>
25
26#include <QtCore/qvector.h>
27
28#include <QtQuick3D/private/qquick3dshaderutils_p.h>
29
31
32class Q_QUICK3D_EXPORT QQuick3DEffect : public QQuick3DObject
33{
35 Q_PROPERTY(QQmlListProperty<QQuick3DShaderUtilsRenderPass> passes READ passes)
36
37 QML_NAMED_ELEMENT(Effect)
38public:
39 explicit QQuick3DEffect(QQuick3DObject *parent = nullptr);
40
41 QQmlListProperty<QQuick3DShaderUtilsRenderPass> passes();
42
43 // Passes
44 static void qmlAppendPass(QQmlListProperty<QQuick3DShaderUtilsRenderPass> *list,
46 static QQuick3DShaderUtilsRenderPass *qmlPassAt(QQmlListProperty<QQuick3DShaderUtilsRenderPass> *list,
48 static qsizetype qmlPassCount(QQmlListProperty<QQuick3DShaderUtilsRenderPass> *list);
49 static void qmlPassClear(QQmlListProperty<QQuick3DShaderUtilsRenderPass> *list);
50
51 void effectChainDirty();
52
53protected:
54 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
55 void itemChange(QQuick3DObject::ItemChange , const QQuick3DObject::ItemChangeData &) override;
56
57private Q_SLOTS:
58 void onPropertyDirty();
59 void onTextureDirty();
60 void onPassDirty();
61
62private:
65
66 enum Dirty {
67 TextureDirty = 0x1,
68 PropertyDirty = 0x2,
69 EffectChainDirty = 0x4
70 };
71
72 void setDynamicTextureMap(QQuick3DShaderUtilsTextureInput *textureMap);
73 void markDirty(QQuick3DEffect::Dirty type);
74
75 quint32 m_dirtyAttributes = 0xffffffff;
76
77 void updateSceneManager(QQuick3DSceneManager *sceneManager);
78
79 QVector<QQuick3DShaderUtilsRenderPass *> m_passes;
80 QSet<QQuick3DShaderUtilsTextureInput *> m_dynamicTextureMaps;
81};
82
84
85#endif // QQUICK3DEFFECT_H
QQmlListProperty< QQuick3DShaderUtilsRenderPass > passes()
\qmltype Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DObject \inherits QtObject
Combined button and popup list for selecting options.
GLuint index
[2]
GLenum type
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
unsigned int quint32
Definition qtypes.h:50
ptrdiff_t qsizetype
Definition qtypes.h:165
QList< int > list
[14]