QRhiMetalInitParams Struct

Metal specific initialization parameters. More...

Header: #include <QRhiMetalInitParams>

Detailed Description

A Metal-based QRhi needs no special parameters for initialization.

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

Note: Metal API validation cannot be enabled by the application. Instead, run the debug build of the application in XCode. Generating a .xcodeproj file via qmake -spec macx-xcode provides a convenient way to enable this.

Note: QRhiSwapChain can only target QWindow instances that have their surface type set to QSurface::MetalSurface.

Working with existing Metal devices

When interoperating with another graphics engine, it may be necessary to get a QRhi instance that uses the same Metal device. This can be achieved by passing a pointer to a QRhiMetalNativeHandles to QRhi::create(). The device must be set to a non-null value then. Optionally, a command queue object can be specified as well.

The QRhi does not take ownership of any of the external objects.

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