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 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | |
13 | class QOpenGLContext; |
14 | |
15 | namespace Qt3DRender { |
16 | |
17 | #if defined(QT_BUILD_INTERNAL) |
18 | class TestAspect; |
19 | #endif |
20 | |
21 | namespace Render { |
22 | class Renderer; |
23 | class QRenderPlugin; |
24 | } |
25 | |
26 | class QRenderAspectPrivate; |
27 | |
28 | #if defined(QT_BUILD_INTERNAL) |
29 | class QRenderAspectTester; |
30 | #endif |
31 | |
32 | class Q_3DRENDERSHARED_EXPORT QRenderAspect : public Qt3DCore::QAbstractAspect |
33 | { |
34 | Q_OBJECT |
35 | public: |
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 | |
45 | protected: |
46 | QRenderAspect(QRenderAspectPrivate &dd, QObject *parent); |
47 | Q_DECLARE_PRIVATE(QRenderAspect) |
48 | |
49 | private: |
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 | |
71 | QT_END_NAMESPACE |
72 | |
73 | #endif // QT3DRENDER_QRENDERASPECT_H |
74 | |