Qt3DRender::QComputeCommand Class | Qt 3D (original) (raw)

class Qt3DRender::QComputeCommand

QComponent to issue work for the compute shader on GPU. More...

Header: #include
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
In QML: ComputeCommand
Inherits: Qt3DCore::QComponent
Status: Deprecated

Properties

Public Functions

Public Slots

Signals

Property Documentation

runType : RunType

Specifies whether the compute command should be performed every frame or manually triggered.

If set to Continuous, Compute command is executed everyframe. This is the default.

If set to Manual CompouteCommand is executed for a given number of frames and then the component disables itself.

Access functions:

Qt3DRender::QComputeCommand::RunType runType() const
void setRunType(Qt3DRender::QComputeCommand::RunType runType)

Notifier signal:

workGroupX : int

Specifies X workgroup size.

Access functions:

Notifier signal:

workGroupY : int

Specifies Y workgroup size.

Access functions:

Notifier signal:

workGroupZ : int

Specifies Z workgroup size.

Access functions:

Notifier signal:

Member Function Documentation

[explicit] QComputeCommand::QComputeCommand(Qt3DCore::QNode *parent = nullptr)

The constructor creates a new Qt3DRender::QComputeCommand instance with the specified parent.

[slot] void QComputeCommand::setWorkGroupX(int workGroupX)

Sets the workgroup for the first dimension to workGroupX.

Note: Setter function for property workGroupX.

See also workGroupX().

[slot] void QComputeCommand::setWorkGroupY(int workGroupY)

Sets the workgroup for the second dimension to workGroupY.

Note: Setter function for property workGroupY.

See also workGroupY().

[slot] void QComputeCommand::setWorkGroupZ(int workGroupZ)

Sets the workgroup for the third dimension to workGroupZ.

Note: Setter function for property workGroupZ.

See also workGroupZ().

[slot] void QComputeCommand::trigger(int frameCount = 1)

When the run type is set to Manual, calling trigger will make the compute command be executed for the next frameCount frames. Upon completion of the execution, the enabled property will be set to false.

[slot] void QComputeCommand::trigger(int workGroupX, int workGroupY, int workGroupZ, int frameCount = 1)

When the run type is set to Manual, calling trigger will make the compute command be executed for the next frameCount frames. Upon completion of the execution, the enabled property will be set to false. The size of the workgroup previously set will be overridden with workGroupX, workGroupY, workGroupZ.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.