QWaitFence#
FrameGraphNode used to wait for a fence in the graphics command stream to become signaled. More…
Synopsis#
Properties#
Functions#
def
handle
()def
handleType
()def
setHandle
(handle)def
setHandleType
(type)def
setTimeout
(timeout)def
setWaitOnCPU
(waitOnCPU)def
timeout
()def
waitOnCPU
()
Signals#
def
handleChanged
(handle)def
handleTypeChanged
(handleType)def
timeoutChanged
(timeoutChanged)def
waitOnCPUChanged
(waitOnCPU)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
Fence allow to synchronosize GPU and CPU workloads. GPU commands usually are non-blocking. When issued, commands are inserted in command buffers which will be read at a later time by the GPU. In some cases, you want to continue processing or issue specific command only when you are sure a command has been executed by the hardware. Fences are a way to do so. This is especially important when using 3rd party engines with Qt3D, Qt3D should only access shared resources when we know the other engine command are done modifying the resource.
QWaitFence
is a FrameGraph node that will force to wait for it to become signaled before subsequent commands are inserted into the command stream. It can then be used in conjunction with QSetFence
and contains properties to configure how long it should wait and whether it should block on the CPU side.
Note
Qt 3D uploads GPU resources (Texture, Shaders, Buffers) before issuing draw calls.
- class PySide6.Qt3DRender.Qt3DRender.QWaitFence([parent=None])#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DRender.Qt3DRender.QWaitFence.handle: object#
Holds the underlying fence handle wrapped in a QVariant.
- Access functions:
handle
()setHandle
(handle)Signal
handleChanged
(handle)
- property PᅟySide6.Qt3DRender.Qt3DRender.QWaitFence.handleType: HandleType#
Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.
- Access functions:
handleType
()setHandleType
(type)Signal
handleTypeChanged
(handleType)
- property PᅟySide6.Qt3DRender.Qt3DRender.QWaitFence.timeout: int#
Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.
- Access functions:
timeout
()setTimeout
(timeout)Signal
timeoutChanged
(timeoutChanged)
- property PᅟySide6.Qt3DRender.Qt3DRender.QWaitFence.waitOnCPU: bool#
Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.
- Access functions:
waitOnCPU
()setWaitOnCPU
(waitOnCPU)Signal
waitOnCPUChanged
(waitOnCPU)
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.HandleType#
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.handle()#
- Return type:
object
See also
Getter of property handle
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.handleChanged(handle)#
- Parameters:
handle – object
Notification signal of property handle
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.handleType()#
- Return type:
See also
Getter of property handleType
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.handleTypeChanged(handleType)#
- Parameters:
handleType –
HandleType
Notification signal of property handleType
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.setHandle(handle)#
- Parameters:
handle – object
See also
Setter of property handle
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.setHandleType(type)#
- Parameters:
type –
HandleType
See also
Setter of property handleType
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.setTimeout(timeout)#
- Parameters:
timeout – int
See also
Setter of property timeout
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.setWaitOnCPU(waitOnCPU)#
- Parameters:
waitOnCPU – bool
See also
Setter of property waitOnCPU
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.timeout()#
- Return type:
int
See also
Getter of property timeout
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.timeoutChanged(timeoutChanged)#
- Parameters:
timeoutChanged – int
Notification signal of property timeout
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.waitOnCPU()#
- Return type:
bool
See also
Getter of property waitOnCPU
.
- PySide6.Qt3DRender.Qt3DRender.QWaitFence.waitOnCPUChanged(waitOnCPU)#
- Parameters:
waitOnCPU – bool
Notification signal of property waitOnCPU
.