1// Copyright (C) 2016 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_BACKENDNODE_H
5#define QT3DRENDER_RENDER_BACKENDNODE_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/qt3drender_global.h>
19#include <Qt3DCore/qbackendnode.h>
20#include <Qt3DCore/qnode.h>
21#include <Qt3DRender/private/abstractrenderer_p.h>
22#include <private/qt3drender_global_p.h>
23
24QT_BEGIN_NAMESPACE
25
26namespace Qt3DCore {
27
28class QBackendNodePrivate;
29
30}
31
32namespace Qt3DRender {
33
34namespace Render {
35
36class RenderBackendResourceAccessor;
37
38class Q_3DRENDERSHARED_PRIVATE_EXPORT BackendNode : public Qt3DCore::QBackendNode
39{
40public:
41 BackendNode(Qt3DCore::QBackendNode::Mode mode = ReadOnly);
42 ~BackendNode();
43
44 void syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime) override;
45
46 void setRenderer(AbstractRenderer *renderer);
47 AbstractRenderer *renderer() const;
48
49 QSharedPointer<RenderBackendResourceAccessor> resourceAccessor() const;
50
51protected:
52 explicit BackendNode(Qt3DCore::QBackendNodePrivate &dd);
53 void markDirty(AbstractRenderer::BackendNodeDirtySet changes);
54 AbstractRenderer *m_renderer;
55};
56
57} // namespace Render
58
59} // namespace Qt3DRender
60
61QT_END_NAMESPACE
62
63#endif // QT3DRENDER_RENDER_BACKENDNODE_H
64

source code of qt3d/src/render/backend/backendnode_p.h