1// Copyright (C) 2015 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_QCOMPUTECOMMAND_H
5#define QT3DRENDER_QCOMPUTECOMMAND_H
6
7#include <Qt3DCore/qcomponent.h>
8#include <Qt3DRender/qt3drender_global.h>
9
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DRender {
13
14class QComputeCommandPrivate;
15
16class Q_3DRENDERSHARED_EXPORT QComputeCommand : public Qt3DCore::QComponent
17{
18 Q_OBJECT
19 Q_PROPERTY(int workGroupX READ workGroupX WRITE setWorkGroupX NOTIFY workGroupXChanged)
20 Q_PROPERTY(int workGroupY READ workGroupY WRITE setWorkGroupY NOTIFY workGroupYChanged)
21 Q_PROPERTY(int workGroupZ READ workGroupZ WRITE setWorkGroupZ NOTIFY workGroupZChanged)
22 Q_PROPERTY(RunType runType READ runType WRITE setRunType NOTIFY runTypeChanged REVISION 13)
23
24public:
25 enum RunType {
26 Continuous = 0,
27 Manual
28 };
29 Q_ENUM(RunType)
30
31 explicit QComputeCommand(Qt3DCore::QNode *parent = nullptr);
32 ~QComputeCommand();
33
34 int workGroupX() const;
35 int workGroupY() const;
36 int workGroupZ() const;
37 RunType runType() const;
38
39public Q_SLOTS:
40 void setWorkGroupX(int workGroupX);
41 void setWorkGroupY(int workGroupY);
42 void setWorkGroupZ(int workGroupZ);
43 Q_REVISION(13) void setRunType(RunType runType);
44
45 Q_REVISION(13) void trigger(int frameCount = 1);
46 Q_REVISION(13) void trigger(int workGroupX, int workGroupY, int workGroupZ, int frameCount = 1);
47
48Q_SIGNALS:
49 void workGroupXChanged();
50 void workGroupYChanged();
51 void workGroupZChanged();
52 void runTypeChanged();
53
54private:
55 Q_DECLARE_PRIVATE(QComputeCommand)
56};
57
58} // Qt3DRender
59
60QT_END_NAMESPACE
61
62#endif // QT3DRENDER_QCOMPUTECOMMAND_H
63

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