QComponentto issue work for the compute shader on GPU. 更多 …
def
runType
()
def
workGroupX
()
def
workGroupY
()
def
workGroupZ
()
def
setRunType
(runType)
def
setWorkGroupX
(workGroupX)
def
setWorkGroupY
(workGroupY)
def
setWorkGroupZ
(workGroupZ)
def
trigger
([frameCount=1])
def
trigger
(workGroupX, workGroupY, workGroupZ[, frameCount=1])
def
runTypeChanged
()
def
workGroupXChanged
()
def
workGroupYChanged
()
def
workGroupZChanged
()
A
QComputeCommandis used to issue work for the compute shader. The compute shader is specified in theQMaterialcomponent of the same entity theQComputeCommandis added to. TheworkGroupX,workGroupYandworkGroupZproperties specify the work group sizes for the compute shader invocation.QDispatchComputenode needs to be present in the FrameGraph to actually issue the commands.注意
If the rendering policy is set to
OnDemandand there are no changes to the scene, the ComputeCommand will not be invoked repeatedly. TheAlwaysrender 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.
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
(
)
¶
另请参阅
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
runTypeChanged
(
)
¶
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
setWorkGroupX
(
workGroupX
)
¶
workGroupX
–
int
Sets the workgroup for the first dimension to
workGroupX
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
setWorkGroupY
(
workGroupY
)
¶
workGroupY
–
int
Sets the workgroup for the second dimension to
workGroupY
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
setWorkGroupZ
(
workGroupZ
)
¶
workGroupZ
–
int
Sets the workgroup for the third dimension to
workGroupZ
.
另请参阅
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
trigger
(
[
frameCount=1
]
)
¶
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.
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
trigger
(
workGroupX
,
workGroupY
,
workGroupZ
[
,
frameCount=1
]
)
¶
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
.
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
workGroupX
(
)
¶
int
另请参阅
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
workGroupXChanged
(
)
¶
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
workGroupY
(
)
¶
int
另请参阅
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
workGroupYChanged
(
)
¶
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
workGroupZ
(
)
¶
int
另请参阅
PySide2.Qt3DRender.Qt3DRender.QComputeCommand.
workGroupZChanged
(
)
¶