QRhiMetalInitParams Struct

금속별 초기화 파라미터. 더 보기...

Header: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
이후: Qt 6.6
상속합니다: QRhiInitParams

상세 설명

참고: 이것은 호환성이 제한적으로 보장되는 RHI API입니다. 자세한 내용은 QRhi 을 참조하세요.

Metal 기반 QRhi 에는 초기화를 위한 특별한 매개변수가 필요하지 않습니다.

QRhiMetalInitParams params;
rhi = QRhi::create(QRhi::Metal, &params);

참고: Metal API 유효성 검사는 QRhi 에서 프로그래밍 방식으로 활성화할 수 없습니다. 대신 cmake -G Xcode 을 통해 .xcodeproj 파일을 생성하여 XCode에서 애플리케이션의 디버그 빌드를 실행하거나 환경 변수 METAL_DEVICE_WRAPPER_TYPE=1 를 설정하세요. 이 변수는 환경 초기에, 가급적이면 프로세스를 시작하기 전에 설정해야 하며 QRhi 생성 시점에 설정하는 것은 실제로는 작동하지 않습니다. (너무 늦을 수도 있습니다.)

참고: QRhiSwapChain 은 표면 유형이 QSurface::MetalSurface 으로 설정된 QWindow 인스턴스만 대상으로 할 수 있습니다.

기존 Metal 디바이스로 작업하기

다른 그래픽 엔진과 상호 운용할 때 동일한 Metal 디바이스를 사용하는 QRhi 인스턴스를 가져와야 할 수 있습니다. 이는 QRhi::create()에 QRhiMetalNativeHandles 포인터를 전달하면 됩니다. 이때 디바이스를 null이 아닌 값으로 설정해야 합니다. 선택적으로 명령 대기열 개체를 지정할 수도 있습니다.

QRhi 은 외부 개체에 대한 소유권을 갖지 않습니다.

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