Qt3DRender::QWaitFence Class
class Qt3DRender::QWaitFenceFrameGraphNode se utilizaba para esperar a que se activara una barrera en el flujo de comandos gráficos. Más...
| Encabezado: | #include <qwaitfence.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| Heredado de: | Qt3DRender::QFrameGraphNode |
| Estado: | Obsoleta |
Esta clase está obsoleta. Se desaconseja encarecidamente su uso en código nuevo.
Propiedades
- handle : QVariant
- handleType : HandleType
- timeout : quint64
- waitOnCPU : bool
Funciones públicas
| QVariant | handle() const |
| Qt3DRender::QWaitFence::HandleType | handleType() const |
| void | setHandle(QVariant handle) |
| void | setHandleType(Qt3DRender::QWaitFence::HandleType type) |
| void | setTimeout(quint64 timeout) |
| void | setWaitOnCPU(bool waitOnCPU) |
| quint64 | timeout() const |
| bool | waitOnCPU() const |
Señales
| void | handleChanged(QVariant handle) |
| void | handleTypeChanged(Qt3DRender::QWaitFence::HandleType handleType) |
| void | timeoutChanged(quint64 timeoutChanged) |
| void | waitOnCPUChanged(bool waitOnCPU) |
Descripción detallada
Las vallas permiten sincronizar las cargas de trabajo de la GPU y la CPU. Los comandos de la GPU suelen ser no bloqueantes. Cuando se emiten, los comandos se insertan en búferes de comandos que la GPU leerá más tarde. En algunos casos, es posible que se desee continuar con el procesamiento o emitir un comando específico solo cuando se tenga la certeza de que el hardware ha ejecutado un comando. Las vallas (fences) son una forma de hacerlo. Esto resulta especialmente importante al utilizar motores de terceros con Qt3D, ya que Qt3D solo debe acceder a los recursos compartidos cuando sabemos que los comandos del otro motor han terminado de modificar el recurso.
QWaitFence es un nodo de FrameGraph que obliga a esperar a que se active antes de que los comandos posteriores se inserten en el flujo de comandos. Se puede utilizar junto con QSetFence y contiene propiedades para configurar cuánto tiempo debe esperar y si debe bloquearse en el lado de la CPU.
Nota: « Qt 3D » carga los recursos de la GPU (texturas, sombreadores, búferes) antes de emitir llamadas de dibujo.
Documentación de propiedades
handle : QVariant
Almacena el identificador de la valla subyacente envuelto en un objeto ` QVariant`.
Funciones de acceso:
| QVariant | handle() const |
| void | setHandle(QVariant handle) |
Señal del notificador:
| void | handleChanged(QVariant handle) |
handleType : HandleType
Especifica el tipo de identificador que se está utilizando. Actualmente solo se admiten los identificadores de valla de OpenGL.
Funciones de acceso:
| Qt3DRender::QWaitFence::HandleType | handleType() const |
| void | setHandleType(Qt3DRender::QWaitFence::HandleType type) |
Señal de notificación:
| void | handleTypeChanged(Qt3DRender::QWaitFence::HandleType handleType) |
timeout : quint64
Especifica el tiempo máximo, en nanosegundos, que se debe esperar a que la barrera se active.
Funciones de acceso:
| quint64 | timeout() const |
| void | setTimeout(quint64 timeout) |
Señal del notificador:
| void | timeoutChanged(quint64 timeoutChanged) |
waitOnCPU : bool
Especifica si la CPU debe bloquearse mientras espera a que se active la barrera. El valor predeterminado es «false».
Funciones de acceso:
| bool | waitOnCPU() const |
| void | setWaitOnCPU(bool waitOnCPU) |
Señal del notificador:
| void | waitOnCPUChanged(bool waitOnCPU) |
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.