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_QRENDERASPECT_H
5#define QT3DRENDER_QRENDERASPECT_H
6
7#include <Qt3DRender/qt3drender_global.h>
8#include <Qt3DCore/qabstractaspect.h>
9
10QT_BEGIN_NAMESPACE
11
12
13class QOpenGLContext;
14
15namespace Qt3DRender {
16
17#if defined(QT_BUILD_INTERNAL)
18class TestAspect;
19#endif
20
21namespace Render {
22class Renderer;
23class QRenderPlugin;
24}
25
26class QRenderAspectPrivate;
27
28#if defined(QT_BUILD_INTERNAL)
29class QRenderAspectTester;
30#endif
31
32class Q_3DRENDERSHARED_EXPORT QRenderAspect : public Qt3DCore::QAbstractAspect
33{
34 Q_OBJECT
35public:
36 enum SubmissionType {
37 Automatic = 0,
38 Manual
39 };
40
41 explicit QRenderAspect(QObject *parent = nullptr);
42 explicit QRenderAspect(SubmissionType submissionType, QObject *parent = nullptr);
43 ~QRenderAspect();
44
45protected:
46 QRenderAspect(QRenderAspectPrivate &dd, QObject *parent);
47 Q_DECLARE_PRIVATE(QRenderAspect)
48
49private:
50 std::vector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) override;
51
52 QVariant executeCommand(const QStringList &args) override;
53
54 void onRegistered() override;
55 void onUnregistered() override;
56
57 void onEngineStartup() override;
58
59 QStringList dependencies() const override;
60
61 friend class Render::Renderer;
62 friend class Render::QRenderPlugin;
63#if defined(QT_BUILD_INTERNAL)
64 friend class QRenderAspectTester;
65 friend class TestAspect;
66#endif
67};
68
69}
70
71QT_END_NAMESPACE
72
73#endif // QT3DRENDER_QRENDERASPECT_H
74

source code of qt3d/src/render/frontend/qrenderaspect.h