Qt3DRender::QSetFence Class
class Qt3DRender::QSetFenceFrameGraphNode 그래픽 명령어 스트림에 울타리를 삽입하는 데 사용됩니다. 더 보기...
| 헤더: | #include <qsetfence.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| 상속: | Qt3DRender::QFrameGraphNode |
| 상태: | 사용 중단됨 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않을 것을 강력히 권장합니다.
속성
- handle : QVariant
- handleType : HandleType
공개 함수
| QVariant | handle() const |
| Qt3DRender::QSetFence::HandleType | handleType() const |
신호
| void | handleChanged(QVariant handle) |
| void | handleTypeChanged(Qt3DRender::QSetFence::HandleType handleType) |
상세 설명
펜스(Fence)는 GPU와 CPU의 작업 부하를 동기화할 수 있게 해줍니다. GPU 명령어는 대개 비차단 방식입니다. 명령어가 발행되면, 해당 명령어는 명령어 버퍼에 삽입되며, 이 버퍼는 나중에 GPU에 의해 읽힙니다. 경우에 따라, 하드웨어에서 명령어가 실행되었음을 확실히 확인한 후에만 처리를 계속하거나 특정 명령어를 발행하고자 할 때가 있습니다. 펜스는 이를 구현하는 방법입니다. 이는 Qt3D와 타사 엔진을 함께 사용할 때 특히 중요합니다. Qt3D는 다른 엔진 명령이 리소스 수정을 완료했다는 것을 확인한 후에야 공유 리소스에 접근해야 합니다.
QSetFence는 명령 스트림에 펜스를 삽입하는 FrameGraph 노드입니다. 이 노드는 ` QWaitFence `와 함께 사용하거나, 기본 핸들을 추출하여 사용할 수 있습니다.
핸들 속성은 렌더러가 기본 펜스 리소스를 생성하면 업데이트됩니다. 핸들은 ‘unsignaled’ 상태에 있는 동안 유효하게 유지됩니다. ‘signaled’ 상태에 도달하면 핸들은 소멸되고 새로운 핸들이 생성됩니다. 즉, 펜스가 ‘signaled’ 상태가 되는 데 걸리는 시간에 따라 동일한 핸들이 여러 프레임에 걸쳐 사용될 수 있습니다.
속성 설명서
[read-only] handle : QVariant
QVariant 로 래핑된 기본 펜스 핸들을 보관합니다.
액세스 함수:
| QVariant | handle() const |
알림 신호:
| void | handleChanged(QVariant handle) |
[read-only] handleType : HandleType
사용 중인 핸들의 유형을 지정합니다. 현재는 OpenGL 펜스 ID만 지원됩니다.
액세스 함수:
| Qt3DRender::QSetFence::HandleType | handleType() const |
알림 신호:
| void | handleTypeChanged(Qt3DRender::QSetFence::HandleType handleType) |
© 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.