blob: 8ffbe0d6ed09f978e8c070ecd71a414b12292a36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import QtQuick
import TestQquickitemrhiintegration
Item {
width: 640
height: 480
Text {
id: apiInfo
color: "black"
font.pixelSize: 16
property int api: GraphicsInfo.api
text: {
if (GraphicsInfo.api === GraphicsInfo.OpenGLRhi)
"OpenGL on QRhi";
else if (GraphicsInfo.api === GraphicsInfo.Direct3D11Rhi)
"D3D11 on QRhi";
else if (GraphicsInfo.api === GraphicsInfo.VulkanRhi)
"Vulkan on QRhi";
else if (GraphicsInfo.api === GraphicsInfo.MetalRhi)
"Metal on QRhi";
else if (GraphicsInfo.api === GraphicsInfo.Null)
"Null on QRhi";
else
"Unknown API";
}
}
TestRhiItem {
anchors.centerIn: parent
width: 400
height: 400
color: "red"
}
}
|