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_opengl_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 QOPENXRGRAPHICSOPENGL_H
7#define QOPENXRGRAPHICSOPENGL_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
24QT_BEGIN_NAMESPACE
25
26class QRhiTexture;
27
29{
30public:
32
34
35 bool initialize(const QVector<XrExtensionProperties> &extensions) override;
36 QVector<const char *> getRequiredExtensions() const override;
37 const XrBaseInStructure *handle() const override;
38 bool setupGraphics(const XrInstance &instance, XrSystemId &systemId, const QQuickGraphicsConfiguration &quickConfig) override;
39 bool finializeGraphics(QRhi *rhi) override;
40 int64_t colorSwapchainFormat(const QVector<int64_t> &swapchainFormats) const override;
41 int64_t depthSwapchainFormat(const QVector<int64_t> &swapchainFormats) const override;
42 QVector<XrSwapchainImageBaseHeader*> allocateSwapchainImages(int count, XrSwapchain swapchain) override;
43 QQuickRenderTarget renderTarget(const XrSwapchainSubImage &subImage, const XrSwapchainImageBaseHeader *swapchainImage,
44 quint64 swapchainFormat, int samples, int arraySize,
45 const XrSwapchainImageBaseHeader *depthSwapchainImage, quint64 depthSwapchainFormat) const override;
46 void setupWindow(QQuickWindow *window) override;
47 QRhi *rhi() const override { return m_rhi; }
49
50private:
51 enum PlatformType m_selectedPlatform = PLATFORM_UNSUPPORTED;
52 QVector<const char *> m_requiredExtensions;
53 std::unique_ptr<XrBaseInStructure, decltype(&std::free)> m_graphicsBinding = { nullptr, std::free };
54
56
57 XrGraphicsRequirementsOpenGLKHR m_graphicsRequirements{};
58 QWindow *m_window = nullptr;
59 QRhi *m_rhi = nullptr;
60 mutable QRhiTexture *m_depthTexture = nullptr;
61};
62
63QT_END_NAMESPACE
64
65#endif // QOPENXRGRAPHICSOPENGL_H
const XrBaseInStructure * handle() const override
QVector< const char * > getRequiredExtensions() const override
bool finializeGraphics(QRhi *rhi) override
int64_t colorSwapchainFormat(const QVector< int64_t > &swapchainFormats) const override
QRhi * rhi() const override
bool setupGraphics(const XrInstance &instance, XrSystemId &systemId, const QQuickGraphicsConfiguration &quickConfig) override
QQuickRenderTarget renderTarget(const XrSwapchainSubImage &subImage, const XrSwapchainImageBaseHeader *swapchainImage, quint64 swapchainFormat, int samples, int arraySize, const XrSwapchainImageBaseHeader *depthSwapchainImage, quint64 depthSwapchainFormat) const override
void setupWindow(QQuickWindow *window) override
bool initialize(const QVector< XrExtensionProperties > &extensions) override
int64_t depthSwapchainFormat(const QVector< int64_t > &swapchainFormats) const override
QVector< XrSwapchainImageBaseHeader * > allocateSwapchainImages(int count, XrSwapchain swapchain) override
Combined button and popup list for selecting options.
#define GL_SRGB8_ALPHA8_EXT
#define GL_DEPTH_COMPONENT32F
Definition qopenglext.h:994
#define GL_DEPTH24_STENCIL8
#define GL_DEPTH_COMPONENT16
Definition qopenglext.h:328
#define GL_DEPTH_COMPONENT24
Definition qopenglext.h:329
#define GL_RGBA8