QRhiMetalInitParams Struct
메탈별 초기화 매개변수. 더 보기...
| 헤더: | #include <rhi/qrhi.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS GuiPrivate) target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate) |
| qmake: | QT += gui-private |
| 다음부터: | Qt 6.6부터 |
| 상속: | QRhiInitParams |
상세 설명
참고: 이 API는 호환성 보장이 제한된 RHI API입니다. 자세한 내용은 QRhi 를 참조하십시오.
Metal 기반의 QRhi 는 초기화를 위해 특별한 매개변수가 필요하지 않습니다.
QRhiMetalInitParams params;
rhi = QRhi::create(QRhi::Metal, ¶ms);참고: QRhi 를 통해 프로그래밍 방식으로Metal API 유효성 검사를 활성화할 수 없습니다. 대신, cmake -G Xcode 를 통해 .xcodeproj 파일을 생성하여 XCode에서 애플리케이션의 디버그 빌드를 실행하거나, 환경 변수 METAL_DEVICE_WRAPPER_TYPE=1 를 설정하십시오. 이 변수는 환경 초기 단계, 가급적이면 프로세스를 시작하기 전에 설정해야 합니다. QRhi 생성 시점에 설정하려고 시도하는 것은 실제로 작동하지 않습니다. (아마도 너무 늦었을 수도 있습니다)
참고: QRhiSwapChain 는 표면 유형이 QSurface::MetalSurface 로 설정된 QWindow 인스턴스만 대상으로 할 수 있습니다.
기존 Metal 장치와 연동하기
다른 그래픽 엔진과 상호 운용할 때, 동일한 Metal 장치를 사용하는 QRhi 인스턴스를 확보해야 할 수 있습니다. 이는 QRhiMetalNativeHandles 에 대한 포인터를 QRhi::create()에 전달하여 달성할 수 있습니다. 이때 장치는 null이 아닌 값으로 설정되어 있어야 합니다. 선택적으로, 명령 대기열 객체도 지정할 수 있습니다.
QRhi 는 어떤 외부 객체에 대해서도 소유권을 가져가지 않습니다.
© 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.