[][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]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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.

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns a reference to the staticMetaObject field.

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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

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

This is supported on cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

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)

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) -> QPtr<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(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *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(&self, arg1: *const c_char) -> *mut 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(&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 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).

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).

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).

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).

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).

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).

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).

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).

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).

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.