1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DRENDER_QTECHNIQUE_H
5#define QT3DRENDER_QTECHNIQUE_H
6
7#include <Qt3DRender/qt3drender_global.h>
8#include <Qt3DCore/qnode.h>
9#include <Qt3DRender/qrenderpass.h>
10#include <Qt3DRender/qfilterkey.h>
11#include <QtCore/QList>
12#include <QtCore/QSharedPointer>
13
14QT_BEGIN_NAMESPACE
15
16namespace Qt3DRender {
17
18class QParameter;
19class QTechniquePrivate;
20class QGraphicsApiFilter;
21
22class Q_3DRENDERSHARED_EXPORT QTechnique : public Qt3DCore::QNode
23{
24 Q_OBJECT
25 Q_PROPERTY(Qt3DRender::QGraphicsApiFilter *graphicsApiFilter READ graphicsApiFilter CONSTANT)
26
27public:
28 explicit QTechnique(Qt3DCore::QNode *parent = nullptr);
29 ~QTechnique();
30
31 void addFilterKey(QFilterKey *filterKey);
32 void removeFilterKey(QFilterKey *filterKey);
33 QList<QFilterKey*> filterKeys() const;
34
35 void addParameter(QParameter *p);
36 void removeParameter(QParameter *p);
37 QList<QParameter *> parameters() const;
38
39 void addRenderPass(QRenderPass *pass);
40 void removeRenderPass(QRenderPass *pass);
41 QList<QRenderPass *> renderPasses() const;
42
43 QGraphicsApiFilter *graphicsApiFilter();
44 const QGraphicsApiFilter *graphicsApiFilter() const;
45
46protected:
47 explicit QTechnique(QTechniquePrivate &dd, Qt3DCore::QNode *parent = nullptr);
48
49private:
50 Q_DECLARE_PRIVATE(QTechnique)
51 Q_PRIVATE_SLOT(d_func(), void _q_graphicsApiFilterChanged())
52};
53
54}
55
56QT_END_NAMESPACE
57
58#endif // QT3DRENDER_QTECHNIQUE_H
59

source code of qt3d/src/render/materialsystem/qtechnique.h