内容表

上一话题

Qt3DRender.QViewport

下一话题

Qt3DRender

Qt3DRender.QWaitFence

FrameGraphNode used to wait for a fence in the graphics command stream to become signaled. 更多

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QWaitFence

New in version 5.13.

概要

函数

信号

详细描述

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.

注意

Qt 3D uploads GPU resources (Texture, Shaders, Buffers) before issuing draw calls.

class PySide2.Qt3DRender.Qt3DRender. QWaitFence ( [ parent=None ] )
参数

parent QNode

PySide2.Qt3DRender.Qt3DRender.QWaitFence. HandleType
PySide2.Qt3DRender.Qt3DRender.QWaitFence. handle ( )
返回类型

object

另请参阅

setHandle()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. handleChanged ( handle )
参数

handle – object

PySide2.Qt3DRender.Qt3DRender.QWaitFence. handleType ( )
返回类型

HandleType

另请参阅

setHandleType()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. handleTypeChanged ( handleType )
参数

handleType HandleType

PySide2.Qt3DRender.Qt3DRender.QWaitFence. setHandle ( handle )
参数

handle – object

另请参阅

handle()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. setHandleType ( type )
参数

type HandleType

另请参阅

handleType()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. setTimeout ( timeout )
参数

timeout quint64

另请参阅

timeout()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. setWaitOnCPU ( waitOnCPU )
参数

waitOnCPU bool

另请参阅

waitOnCPU()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. timeout ( )
返回类型

quint64

另请参阅

setTimeout()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. timeoutChanged ( timeoutChanged )
参数

timeoutChanged quint64

PySide2.Qt3DRender.Qt3DRender.QWaitFence. waitOnCPU ( )
返回类型

bool

另请参阅

setWaitOnCPU()

PySide2.Qt3DRender.Qt3DRender.QWaitFence. waitOnCPUChanged ( waitOnCPU )
参数

waitOnCPU bool