内容表

上一话题

Qt3DRender.QSeamlessCubemap

下一话题

Qt3DRender.QShaderData

Qt3DRender.QSetFence

FrameGraphNode used to insert a fence in the graphics command stream. 更多

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QSetFence

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.

QSetFence is a FrameGraph node that inserts a fence into the command stream. It can then be used in conjunction with QWaitFence or by extracting the underlying handle.

The handle property will be updated once the renderer has created the underlying fence resource. The handle will remain valid as long as it remains in the unsignaled state. Once it has reached the signaled state, it will be destroyed and a new handle will be created. That means that depending on how long it takes for the fence to be signaled, the same handle could be used over several frames.

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

parent QNode

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

object

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

handle – object

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

HandleType

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

handleType HandleType