헬로 벌칸 위젯 예제
QWidget 애플리케이션에서 QVulkanWindow 의 사용법을 보여줍니다.
헬로 벌칸 위젯 예제는 QWidget::createWindowContainer()를 사용하여 QWidget 기반 사용자 인터페이스에 QVulkanWindow 을 임베드하는 헬로 벌칸 위젯의 변형입니다.
Vulkan 파이프라인을 설정하고 삼각형을 렌더링하는 코드는 hellovulkantriangle에서와 동일합니다. 또한 이 예제에서는 QVulkanWindow 의 또 다른 기능인 컬러 버퍼에서 이미지 콘텐츠를 QImage 로 다시 읽어오는 기능을 보여줍니다. 이 예제에서는 Grab 버튼을 클릭하면 다음 프레임을 렌더링한 후 전송 작업을 수행하여 스왑체인 컬러 버퍼 콘텐츠를 호스트 액세스 가능 메모리로 복사합니다. 그런 다음 이미지가 QImage::save()를 통해 디스크에 저장됩니다.
예제 실행하기
에서 예제를 실행하려면 Qt Creator에서 Welcome 모드를 열고 Examples 에서 예제를 선택합니다. 자세한 내용은 예제 빌드 및 실행하기를 참조하세요.
© 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.