QComputeCommand¶
QComponent to issue work for the compute shader on GPU. More…
Synopsis¶
Functions¶
def
runType
()def
workGroupX
()def
workGroupY
()def
workGroupZ
()
Slots¶
def
setRunType
(runType)def
setWorkGroupX
(workGroupX)def
setWorkGroupY
(workGroupY)def
setWorkGroupZ
(workGroupZ)def
trigger
([frameCount=1])def
trigger
(workGroupX, workGroupY, workGroupZ[, frameCount=1])
Signals¶
def
runTypeChanged
()def
workGroupXChanged
()def
workGroupYChanged
()def
workGroupZChanged
()
Detailed Description¶
A QComputeCommand
is used to issue work for the compute shader. The compute shader is specified in the QMaterial
component of the same entity the QComputeCommand
is added to. The workGroupX
, workGroupY
and workGroupZ
properties specify the work group sizes for the compute shader invocation. QDispatchCompute
node needs to be present in the FrameGraph to actually issue the commands.
Note
If the rendering policy is set to OnDemand
and there are no changes to the scene, the ComputeCommand will not be invoked repeatedly. The Always
render policy must be set for the ComputeCommand to be repeatedly invoked if there are no other changes to the scene that triggers rendering a new frame.
- class PySide6.Qt3DRender.Qt3DRender.QComputeCommand([parent=None])¶
- Parameters
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
The constructor creates a new QComputeCommand
instance with the specified parent
.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.RunType¶
New in version 5.13.
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.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.runTypeChanged()¶
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.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.setWorkGroupX(workGroupX)¶
- Parameters
workGroupX – int
Specifies X workgroup size.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.setWorkGroupY(workGroupY)¶
- Parameters
workGroupY – int
Specifies Y workgroup size.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.setWorkGroupZ(workGroupZ)¶
- Parameters
workGroupZ – int
Specifies Z workgroup size.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.trigger([frameCount=1])¶
- Parameters
frameCount – int
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.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.trigger(workGroupX, workGroupY, workGroupZ[, frameCount=1])
- Parameters
workGroupX – int
workGroupY – int
workGroupZ – int
frameCount – int
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
.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.workGroupX()¶
- Return type
int
Specifies X workgroup size.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.workGroupXChanged()¶
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.workGroupY()¶
- Return type
int
Specifies Y workgroup size.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.workGroupYChanged()¶
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.workGroupZ()¶
- Return type
int
Specifies Z workgroup size.
- PySide6.Qt3DRender.Qt3DRender.QComputeCommand.workGroupZChanged()¶
© 2022 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.