Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qopenxrgraphics_d3d11_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#ifndef QOPENXRGRAPHICSD3D11_H
7#define QOPENXRGRAPHICSD3D11_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20
21#include <QtQuick3DXr/private/qabstractopenxrgraphics_p.h>
22#include <QtQuick3DXr/private/qopenxrplatform_p.h>
23#include <QtCore/QMap>
24
25QT_BEGIN_NAMESPACE
26
27class QOpenXRGraphicsD3D11 : public QAbstractOpenXRGraphics
28{
29public:
30 QOpenXRGraphicsD3D11();
31
32 bool initialize(const QVector<XrExtensionProperties> &extensions) override;
33 QVector<const char *> getRequiredExtensions() const override;
34 const XrBaseInStructure *handle() const override;
35 bool setupGraphics(const XrInstance &instance, XrSystemId &systemId, const QQuickGraphicsConfiguration &quickConfig) override;
36 bool finializeGraphics(QRhi *rhi) override;
37 int64_t colorSwapchainFormat(const QVector<int64_t> &swapchainFormats) const override;
38 int64_t depthSwapchainFormat(const QVector<int64_t> &swapchainFormats) const override;
39 QVector<XrSwapchainImageBaseHeader*> allocateSwapchainImages(int count, XrSwapchain swapchain) override;
40 QQuickRenderTarget renderTarget(const XrSwapchainSubImage &subImage, const XrSwapchainImageBaseHeader *swapchainImage,
41 quint64 swapchainFormat, int samples, int arraySize,
42 const XrSwapchainImageBaseHeader *depthSwapchainImage, quint64 depthSwapchainFormat) const override;
43 QRhi *rhi() const override { return m_rhi; }
44 void setupWindow(QQuickWindow *quickWindow) override;
45
46private:
47 QRhi *m_rhi = nullptr;
48 XrGraphicsBindingD3D11KHR m_graphicsBinding = {};
49 QMap<XrSwapchain, QVector<XrSwapchainImageD3D11KHR>> m_swapchainImageBuffer;
50 XrGraphicsRequirementsD3D11KHR m_graphicsRequirements = {};
51};
52
53QT_END_NAMESPACE
54
55#endif // QOPENXRGRAPHICSD3D11_H
Combined button and popup list for selecting options.