Qt3DRender::QWaitFence Class
class Qt3DRender::QWaitFenceFrameGraphNode se utiliza para esperar a que se señale una valla en el flujo de comandos gráficos. Más...
| Cabecera: | #include <QWaitFence> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender)target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| Hereda: | Qt3DRender::QFrameGraphNode |
| Status: | Obsoleto |
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
Fence permite 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 buffers de comandos que serán leídos posteriormente por la GPU. En algunos casos, se desea continuar el procesamiento o emitir un comando específico sólo cuando se está seguro de que un comando ha sido ejecutado por el hardware. Las cercas son una forma de hacerlo. Esto es especialmente importante cuando se utilizan motores de terceros con Qt3D, Qt3D sólo debe acceder a los recursos compartidos cuando sabemos que el comando del otro motor ha terminado de modificar el recurso.
QWaitFence es un nodo FrameGraph que obligará a esperar a que sea señalizado antes de insertar comandos posteriores en el flujo de comandos. Se puede utilizar junto con QSetFence y contiene propiedades para configurar cuánto tiempo debe esperar y si debe bloquear en el lado de la CPU.
Nota: Qt 3D carga los recursos de la GPU (Textura, Shaders, Buffers) antes de emitir llamadas a dibujo.
Documentación de propiedades
handle : QVariant
Sujeta el asa de la valla subyacente envuelta en un QVariant.
Funciones de acceso:
| QVariant | handle() const |
| void | setHandle(QVariant handle) |
Señal de notificador:
| void | handleChanged(QVariant handle) |
handleType : HandleType
Especifica el tipo de manejador que se está utilizando. Actualmente sólo se admiten identificadores OpenGL Fence.
Funciones de acceso:
| Qt3DRender::QWaitFence::HandleType | handleType() const |
| void | setHandleType(Qt3DRender::QWaitFence::HandleType type) |
Señal de notificador:
| void | handleTypeChanged(Qt3DRender::QWaitFence::HandleType handleType) |
timeout : quint64
Especifica el tiempo máximo en nanosegundos que se debe esperar para que la valla sea señalizada.
Funciones de acceso:
| quint64 | timeout() const |
| void | setTimeout(quint64 timeout) |
Señalizador:
| void | timeoutChanged(quint64 timeoutChanged) |
waitOnCPU : bool
Especifica si la CPU debe bloquearse mientras se espera la señalización de la valla. Por defecto es false.
Funciones de acceso:
| bool | waitOnCPU() const |
| void | setWaitOnCPU(bool waitOnCPU) |
Notificador de señal:
| 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.