1 | // Copyright (C) 2016 Paul Lemire <paul.lemire350@gmail.com> |
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_DEBUG_COMMANDEXECUTER_H |
5 | #define QT3DRENDER_DEBUG_COMMANDEXECUTER_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 <QList> |
19 | #include <QMutex> |
20 | #include <QVariant> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | namespace Qt3DCore { |
25 | |
26 | namespace Debug { |
27 | class AsynchronousCommandReply; |
28 | } // Debug |
29 | |
30 | } // Qt3DCore |
31 | |
32 | namespace Qt3DRender { |
33 | |
34 | namespace Render { |
35 | namespace OpenGL { |
36 | class Renderer; |
37 | class RenderView; |
38 | } // OpenGL |
39 | } // Render |
40 | |
41 | namespace Debug { |
42 | |
43 | class CommandExecuter |
44 | { |
45 | public: |
46 | explicit CommandExecuter(Render::OpenGL::Renderer *renderer); |
47 | |
48 | void performAsynchronousCommandExecution(const std::vector<Render::OpenGL::RenderView *> &views); |
49 | |
50 | QVariant executeCommand(const QStringList &args); |
51 | |
52 | private: |
53 | Render::OpenGL::Renderer *m_renderer; |
54 | QList<Qt3DCore::Debug::AsynchronousCommandReply *> m_pendingCommands; |
55 | QMutex m_pendingCommandsMutex; |
56 | }; |
57 | |
58 | } // Debug |
59 | |
60 | } // Qt3DRender |
61 | |
62 | QT_END_NAMESPACE |
63 | |
64 | #endif // QT3DRENDER_DEBUG_COMMANDEXECUTER_H |
65 | |