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_RENDER_PARAMETER_P_H |
5 | #define QT3DRENDER_RENDER_PARAMETER_P_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 for the convenience |
12 | // of other Qt classes. 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 <Qt3DRender/private/backendnode_p.h> |
19 | #include <Qt3DRender/private/uniform_p.h> |
20 | #include <QVariant> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | namespace Qt3DRender { |
25 | |
26 | namespace Render { |
27 | |
28 | class ParameterManager; |
29 | class ShaderDataManager; |
30 | |
31 | class Q_3DRENDERSHARED_PRIVATE_EXPORT Parameter : public BackendNode |
32 | { |
33 | public: |
34 | Parameter(); |
35 | |
36 | void cleanup(); |
37 | |
38 | void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; |
39 | |
40 | QString name() const; |
41 | int nameId() const noexcept { return m_nameId; } |
42 | const UniformValue &uniformValue() const { return m_uniformValue; } |
43 | QVariant backendValue() const { return m_backendValue; } |
44 | |
45 | private: |
46 | QString m_name; |
47 | QVariant m_backendValue; |
48 | UniformValue m_uniformValue; |
49 | int m_nameId; |
50 | }; |
51 | |
52 | } // namespace Render |
53 | |
54 | } // namespace Qt3DRender |
55 | |
56 | QT_END_NAMESPACE |
57 | |
58 | #endif // QT3DRENDER_RENDER_PARAMETER_P_H |
59 | |