1 | // Copyright (C) 2016 The Qt Company Ltd. |
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_LIGHT_P_H |
5 | #define QT3DRENDER_RENDER_LIGHT_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 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | namespace Qt3DRender { |
23 | |
24 | namespace Render { |
25 | |
26 | class NodeManagers; |
27 | |
28 | class Q_3DRENDERSHARED_PRIVATE_EXPORT Light : public BackendNode |
29 | { |
30 | public: |
31 | Qt3DCore::QNodeId shaderData() const; |
32 | |
33 | void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override; |
34 | |
35 | private: |
36 | Qt3DCore::QNodeId m_shaderDataId; |
37 | }; |
38 | |
39 | class RenderLightFunctor : public Qt3DCore::QBackendNodeMapper |
40 | { |
41 | public: |
42 | explicit RenderLightFunctor(AbstractRenderer *renderer, NodeManagers *managers); |
43 | |
44 | Qt3DCore::QBackendNode *create(Qt3DCore::QNodeId id) const override; |
45 | Qt3DCore::QBackendNode *get(Qt3DCore::QNodeId id) const final; |
46 | void destroy(Qt3DCore::QNodeId id) const final; |
47 | |
48 | private: |
49 | NodeManagers *m_managers; |
50 | AbstractRenderer *m_renderer; |
51 | }; |
52 | |
53 | } // namespace Render |
54 | |
55 | } // namespace Qt3DRender |
56 | |
57 | QT_END_NAMESPACE |
58 | |
59 | Q_DECLARE_METATYPE(Qt3DRender::Render::Light*) // LCOV_EXCL_LINE |
60 | |
61 | #endif // QT3DRENDER_RENDER_LIGHT_P_H |
62 | |