QWaitFence Class

class Qt3DRender::QWaitFence

FrameGraphNode 는 그래픽 명령 스트림에서 펜스가 신호를 받을 때까지 기다리는 데 사용됩니다. 더 보기...

헤더: #include <QWaitFence>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
상속합니다: Qt3DRender::QFrameGraphNode
상태: Deprecated

속성

공공 기능

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

신호

void handleChanged(QVariant handle)
void handleTypeChanged(Qt3DRender::QWaitFence::HandleType handleType)
void timeoutChanged(quint64 timeoutChanged)
void waitOnCPUChanged(bool waitOnCPU)

상세 설명

펜스를 사용하면 GPU와 CPU 워크로드를 동기화할 수 있습니다. GPU 명령은 일반적으로 비블록킹입니다. 명령이 실행되면 명령은 명령 버퍼에 삽입되어 나중에 GPU에서 읽게 됩니다. 어떤 경우에는 하드웨어에서 명령이 실행되었다고 확신할 때만 처리를 계속하거나 특정 명령을 실행하고 싶을 수 있습니다. 펜스는 이를 위한 방법입니다. 이는 Qt3D와 함께 타사 엔진을 사용할 때 특히 중요한데, Qt3D는 다른 엔진 명령이 리소스 수정을 완료한 것을 알 때만 공유 리소스에 액세스해야 합니다.

QWaitFence는 후속 명령이 명령 스트림에 삽입되기 전에 강제로 신호를 기다리게 하는 프레임그래프 노드입니다. 그런 다음 QSetFence 와 함께 사용할 수 있으며 대기 시간과 CPU 측에서 차단할지 여부를 구성하는 속성을 포함합니다.

참고: Qt 3D 은 그리기 호출을 실행하기 전에 GPU 리소스(텍스처, 셰이더, 버퍼)를 업로드합니다.

프로퍼티 문서

handle : QVariant

QVariant 로 감싼 기본 펜스 핸들을 고정합니다.

기능에 액세스합니다:

QVariant handle() const
void setHandle(QVariant handle)

알림 신호:

void handleChanged(QVariant handle)

handleType : HandleType

사용 중인 핸들 유형을 지정합니다. 현재 OpenGL Fence ID만 지원됩니다.

액세스 함수:

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

알림 신호:

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

timeout : quint64

펜스가 신호를 받을 때까지 기다리는 최대 시간(나노초)을 지정합니다.

기능 액세스:

quint64 timeout() const
void setTimeout(quint64 timeout)

알림 신호:

void timeoutChanged(quint64 timeoutChanged)

waitOnCPU : bool

펜스가 신호를 받을 때까지 기다리는 동안 CPU를 차단할지 여부를 지정합니다. 기본적으로 false입니다.

액세스 기능:

bool waitOnCPU() const
void setWaitOnCPU(bool waitOnCPU)

알림 신호:

void waitOnCPUChanged(bool waitOnCPU)

© 2025 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.