[][src]Struct qt_3d_render::QWaitFence

#[repr(C)]
pub struct QWaitFence { /* fields omitted */ }

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.

C++ class: Qt3DRender::QWaitFence.

C++ documentation:

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.

Methods

impl QWaitFence[src]

pub fn wait_on_c_p_u_changed(&self) -> Signal<(bool,)>[src]

Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.

Returns a built-in Qt signal Qt3DRender::QWaitFence::waitOnCPUChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.

Access functions:

bool waitOnCPU() const
void setWaitOnCPU(bool waitOnCPU)

Notifier signal:

void waitOnCPUChanged(bool waitOnCPU)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub fn timeout_changed(&self) -> Signal<(u64,)>[src]

Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.

Returns a built-in Qt signal Qt3DRender::QWaitFence::timeoutChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.

Access functions:

quint64 timeout() const
void setTimeout(quint64 timeout)

Notifier signal:

void timeoutChanged(quint64 timeoutChanged)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub fn handle_type_changed(&self) -> Signal<(HandleType,)>[src]

Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.

Returns a built-in Qt signal Qt3DRender::QWaitFence::handleTypeChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.

Access functions:

Qt3DRender::QWaitFence::HandleType handleType() const
void setHandleType(Qt3DRender::QWaitFence::HandleType type)

Notifier signal:

void handleTypeChanged(Qt3DRender::QWaitFence::HandleType handleType)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub fn handle_changed(&self) -> Signal<(*const QVariant,)>[src]

Holds the underlying fence handle wrapped in a QVariant.

Returns a built-in Qt signal Qt3DRender::QWaitFence::handleChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Holds the underlying fence handle wrapped in a QVariant.

Access functions:

QVariant handle() const
void setHandle(QVariant handle)

Notifier signal:

void handleChanged(QVariant handle)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn handle(&self) -> CppBox<QVariant>[src]

Holds the underlying fence handle wrapped in a QVariant.

Calls C++ function: QVariant Qt3DRender::QWaitFence::handle() const.

C++ documentation:

Holds the underlying fence handle wrapped in a QVariant.

Access functions:

QVariant handle() const
void setHandle(QVariant handle)

Notifier signal:

void handleChanged(QVariant handle)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn handle_type(&self) -> HandleType[src]

Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.

Calls C++ function: Qt3DRender::QWaitFence::HandleType Qt3DRender::QWaitFence::handleType() const.

C++ documentation:

Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.

Access functions:

Qt3DRender::QWaitFence::HandleType handleType() const
void setHandleType(Qt3DRender::QWaitFence::HandleType type)

Notifier signal:

void handleTypeChanged(Qt3DRender::QWaitFence::HandleType handleType)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* Qt3DRender::QWaitFence::metaObject() const.

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn new_1a(parent: impl CastInto<MutPtr<QNode>>) -> QBox<QWaitFence>[src]

Calls C++ function: [constructor] void Qt3DRender::QWaitFence::QWaitFence(Qt3DCore::QNode* parent = …).

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn new_0a() -> QBox<QWaitFence>[src]

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.

Calls C++ function: [constructor] void Qt3DRender::QWaitFence::QWaitFence().

C++ documentation:

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.

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int Qt3DRender::QWaitFence::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* Qt3DRender::QWaitFence::qt_metacast(const char* arg1).

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn set_handle(&mut self, handle: impl CastInto<Ref<QVariant>>)[src]

Holds the underlying fence handle wrapped in a QVariant.

Calls C++ function: void Qt3DRender::QWaitFence::setHandle(QVariant handle).

C++ documentation:

Holds the underlying fence handle wrapped in a QVariant.

Access functions:

QVariant handle() const
void setHandle(QVariant handle)

Notifier signal:

void handleChanged(QVariant handle)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn set_handle_type(&mut self, type_: HandleType)[src]

Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.

Calls C++ function: void Qt3DRender::QWaitFence::setHandleType(Qt3DRender::QWaitFence::HandleType type).

C++ documentation:

Specifies the type of handle being used. Currently only OpenGL Fence ids are supported.

Access functions:

Qt3DRender::QWaitFence::HandleType handleType() const
void setHandleType(Qt3DRender::QWaitFence::HandleType type)

Notifier signal:

void handleTypeChanged(Qt3DRender::QWaitFence::HandleType handleType)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn set_timeout(&mut self, timeout: u64)[src]

Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.

Calls C++ function: void Qt3DRender::QWaitFence::setTimeout(quint64 timeout).

C++ documentation:

Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.

Access functions:

quint64 timeout() const
void setTimeout(quint64 timeout)

Notifier signal:

void timeoutChanged(quint64 timeoutChanged)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn set_wait_on_c_p_u(&mut self, wait_on_c_p_u: bool)[src]

Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.

Calls C++ function: void Qt3DRender::QWaitFence::setWaitOnCPU(bool waitOnCPU).

C++ documentation:

Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.

Access functions:

bool waitOnCPU() const
void setWaitOnCPU(bool waitOnCPU)

Notifier signal:

void waitOnCPUChanged(bool waitOnCPU)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn timeout(&self) -> u64[src]

Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.

Calls C++ function: quint64 Qt3DRender::QWaitFence::timeout() const.

C++ documentation:

Specifies the maximum amount of time in nanoseconds to wait for the fence to become signaled.

Access functions:

quint64 timeout() const
void setTimeout(quint64 timeout)

Notifier signal:

void timeoutChanged(quint64 timeoutChanged)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString Qt3DRender::QWaitFence::tr(const char* s, const char* c, int n).

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString Qt3DRender::QWaitFence::trUtf8(const char* s, const char* c, int n).

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

pub unsafe fn wait_on_c_p_u(&self) -> bool[src]

Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.

Calls C++ function: bool Qt3DRender::QWaitFence::waitOnCPU() const.

C++ documentation:

Specifies whether the CPU should be block while waiting for the fence to become signaled. This is false by default.

Access functions:

bool waitOnCPU() const
void setWaitOnCPU(bool waitOnCPU)

Notifier signal:

void waitOnCPUChanged(bool waitOnCPU)

This item is available if any(cpp_lib_version="5.13.0", cpp_lib_version="5.14.0").

Methods from Deref<Target = QFrameGraphNode>

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* Qt3DRender::QFrameGraphNode::metaObject() const.

pub unsafe fn parent_frame_graph_node(&self) -> QMutPtr<QFrameGraphNode>[src]

Returns a pointer to the parent.

Calls C++ function: Qt3DRender::QFrameGraphNode* Qt3DRender::QFrameGraphNode::parentFrameGraphNode() const.

C++ documentation:

Returns a pointer to the parent.

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int Qt3DRender::QFrameGraphNode::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* Qt3DRender::QFrameGraphNode::qt_metacast(const char* arg1).

Trait Implementations

impl CppDeletable for QWaitFence[src]

unsafe fn delete(&mut self)[src]

Calls C++ function: virtual [destructor] void Qt3DRender::QWaitFence::~QWaitFence().

impl Deref for QWaitFence[src]

type Target = QFrameGraphNode

The resulting type after dereferencing.

fn deref(&self) -> &QFrameGraphNode[src]

Calls C++ function: Qt3DRender::QFrameGraphNode* static_cast<Qt3DRender::QFrameGraphNode*>(Qt3DRender::QWaitFence* ptr).

impl DerefMut for QWaitFence[src]

fn deref_mut(&mut self) -> &mut QFrameGraphNode[src]

Calls C++ function: Qt3DRender::QFrameGraphNode* static_cast<Qt3DRender::QFrameGraphNode*>(Qt3DRender::QWaitFence* ptr).

impl DynamicCast<QWaitFence> for QFrameGraphNode[src]

unsafe fn dynamic_cast(ptr: Ptr<QFrameGraphNode>) -> Ptr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* dynamic_cast<Qt3DRender::QWaitFence*>(Qt3DRender::QFrameGraphNode* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QFrameGraphNode>) -> MutPtr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* dynamic_cast<Qt3DRender::QWaitFence*>(Qt3DRender::QFrameGraphNode* ptr).

impl DynamicCast<QWaitFence> for QNode[src]

unsafe fn dynamic_cast(ptr: Ptr<QNode>) -> Ptr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* dynamic_cast<Qt3DRender::QWaitFence*>(Qt3DCore::QNode* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QNode>) -> MutPtr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* dynamic_cast<Qt3DRender::QWaitFence*>(Qt3DCore::QNode* ptr).

impl DynamicCast<QWaitFence> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* dynamic_cast<Qt3DRender::QWaitFence*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* dynamic_cast<Qt3DRender::QWaitFence*>(QObject* ptr).

impl StaticDowncast<QWaitFence> for QFrameGraphNode[src]

unsafe fn static_downcast(ptr: Ptr<QFrameGraphNode>) -> Ptr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* static_cast<Qt3DRender::QWaitFence*>(Qt3DRender::QFrameGraphNode* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QFrameGraphNode>
) -> MutPtr<QWaitFence>
[src]

Calls C++ function: Qt3DRender::QWaitFence* static_cast<Qt3DRender::QWaitFence*>(Qt3DRender::QFrameGraphNode* ptr).

impl StaticDowncast<QWaitFence> for QNode[src]

unsafe fn static_downcast(ptr: Ptr<QNode>) -> Ptr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* static_cast<Qt3DRender::QWaitFence*>(Qt3DCore::QNode* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QNode>) -> MutPtr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* static_cast<Qt3DRender::QWaitFence*>(Qt3DCore::QNode* ptr).

impl StaticDowncast<QWaitFence> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* static_cast<Qt3DRender::QWaitFence*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QWaitFence>[src]

Calls C++ function: Qt3DRender::QWaitFence* static_cast<Qt3DRender::QWaitFence*>(QObject* ptr).

impl StaticUpcast<QFrameGraphNode> for QWaitFence[src]

unsafe fn static_upcast(ptr: Ptr<QWaitFence>) -> Ptr<QFrameGraphNode>[src]

Calls C++ function: Qt3DRender::QFrameGraphNode* static_cast<Qt3DRender::QFrameGraphNode*>(Qt3DRender::QWaitFence* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QWaitFence>) -> MutPtr<QFrameGraphNode>[src]

Calls C++ function: Qt3DRender::QFrameGraphNode* static_cast<Qt3DRender::QFrameGraphNode*>(Qt3DRender::QWaitFence* ptr).

impl StaticUpcast<QNode> for QWaitFence[src]

unsafe fn static_upcast(ptr: Ptr<QWaitFence>) -> Ptr<QNode>[src]

Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QWaitFence* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QWaitFence>) -> MutPtr<QNode>[src]

Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QWaitFence* ptr).

impl StaticUpcast<QObject> for QWaitFence[src]

unsafe fn static_upcast(ptr: Ptr<QWaitFence>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QWaitFence* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QWaitFence>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QWaitFence* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.