Qt3DRender.QComputeCommand

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

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QComputeCommand

Synopsis

Functions

Slots

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 PySide2.Qt3DRender.Qt3DRender.QComputeCommand([parent=None])
param parent

QNode

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

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.RunType

New in version 5.13.

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.runType()
Return type

RunType

See also

setRunType()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.runTypeChanged()
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.setRunType(runType)
Parameters

runTypeRunType

See also

runType()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.setWorkGroupX(workGroupX)
Parameters

workGroupXint

Sets the workgroup for the first dimension to workGroupX .

See also

workGroupX()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.setWorkGroupY(workGroupY)
Parameters

workGroupYint

Sets the workgroup for the second dimension to workGroupY .

See also

workGroupY()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.setWorkGroupZ(workGroupZ)
Parameters

workGroupZint

Sets the workgroup for the third dimension to workGroupZ .

See also

workGroupZ()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.trigger([frameCount=1])
Parameters

frameCountint

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.

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.trigger(workGroupX, workGroupY, workGroupZ[, frameCount=1])
Parameters
  • workGroupXint

  • workGroupYint

  • workGroupZint

  • frameCountint

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 .

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.workGroupX()
Return type

int

See also

setWorkGroupX()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.workGroupXChanged()
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.workGroupY()
Return type

int

See also

setWorkGroupY()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.workGroupYChanged()
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.workGroupZ()
Return type

int

See also

setWorkGroupZ()

PySide2.Qt3DRender.Qt3DRender.QComputeCommand.workGroupZChanged()