Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
24
QT_BEGIN_NAMESPACE
25
26
class
QRhiTexture;
27
28
class
QOpenXRGraphicsOpenGL
:
public
QAbstractOpenXRGraphics
29
{
30
public
:
31
QOpenXRGraphicsOpenGL
();
32
33
enum
PlatformType
{
PLATFORM_UNSUPPORTED
,
PLATFORM_EGL
,
PLATFORM_WAYLAND
,
PLATFORM_XLIB
,
PLATFORM_WIN32
};
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; }
48
void
releaseResources
()
override
;
49
50
private
:
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
55
QMap
<
XrSwapchain
,
QVector
<
XrSwapchainImageOpenGLKHR
>>
m_swapchainImageBuffer
;
56
57
XrGraphicsRequirementsOpenGLKHR m_graphicsRequirements{};
58
QWindow *m_window =
nullptr
;
59
QRhi *m_rhi =
nullptr
;
60
mutable
QRhiTexture *m_depthTexture =
nullptr
;
61
};
62
63
QT_END_NAMESPACE
64
65
#
endif
// QOPENXRGRAPHICSOPENGL_H
QOpenXRGraphicsOpenGL
Definition
qopenxrgraphics_opengl_p.h:29
QOpenXRGraphicsOpenGL::handle
const XrBaseInStructure * handle() const override
Definition
qopenxrgraphics_opengl.cpp:118
QOpenXRGraphicsOpenGL::getRequiredExtensions
QVector< const char * > getRequiredExtensions() const override
Definition
qopenxrgraphics_opengl.cpp:112
QOpenXRGraphicsOpenGL::finializeGraphics
bool finializeGraphics(QRhi *rhi) override
Definition
qopenxrgraphics_opengl.cpp:140
QOpenXRGraphicsOpenGL::colorSwapchainFormat
int64_t colorSwapchainFormat(const QVector< int64_t > &swapchainFormats) const override
Definition
qopenxrgraphics_opengl.cpp:250
QOpenXRGraphicsOpenGL::rhi
QRhi * rhi() const override
Definition
qopenxrgraphics_opengl_p.h:47
QOpenXRGraphicsOpenGL::releaseResources
void releaseResources() override
Definition
qopenxrgraphics_opengl.cpp:356
QOpenXRGraphicsOpenGL::PlatformType
PlatformType
Definition
qopenxrgraphics_opengl_p.h:33
QOpenXRGraphicsOpenGL::PLATFORM_WIN32
@ PLATFORM_WIN32
Definition
qopenxrgraphics_opengl_p.h:33
QOpenXRGraphicsOpenGL::PLATFORM_UNSUPPORTED
@ PLATFORM_UNSUPPORTED
Definition
qopenxrgraphics_opengl_p.h:33
QOpenXRGraphicsOpenGL::PLATFORM_EGL
@ PLATFORM_EGL
Definition
qopenxrgraphics_opengl_p.h:33
QOpenXRGraphicsOpenGL::PLATFORM_XLIB
@ PLATFORM_XLIB
Definition
qopenxrgraphics_opengl_p.h:33
QOpenXRGraphicsOpenGL::PLATFORM_WAYLAND
@ PLATFORM_WAYLAND
Definition
qopenxrgraphics_opengl_p.h:33
QOpenXRGraphicsOpenGL::setupGraphics
bool setupGraphics(const XrInstance &instance, XrSystemId &systemId, const QQuickGraphicsConfiguration &quickConfig) override
Definition
qopenxrgraphics_opengl.cpp:124
QOpenXRGraphicsOpenGL::renderTarget
QQuickRenderTarget renderTarget(const XrSwapchainSubImage &subImage, const XrSwapchainImageBaseHeader *swapchainImage, quint64 swapchainFormat, int samples, int arraySize, const XrSwapchainImageBaseHeader *depthSwapchainImage, quint64 depthSwapchainFormat) const override
Definition
qopenxrgraphics_opengl.cpp:291
QOpenXRGraphicsOpenGL::setupWindow
void setupWindow(QQuickWindow *window) override
Definition
qopenxrgraphics_opengl.cpp:351
QOpenXRGraphicsOpenGL::initialize
bool initialize(const QVector< XrExtensionProperties > &extensions) override
Definition
qopenxrgraphics_opengl.cpp:58
QOpenXRGraphicsOpenGL::depthSwapchainFormat
int64_t depthSwapchainFormat(const QVector< int64_t > &swapchainFormats) const override
Definition
qopenxrgraphics_opengl.cpp:262
QOpenXRGraphicsOpenGL::allocateSwapchainImages
QVector< XrSwapchainImageBaseHeader * > allocateSwapchainImages(int count, XrSwapchain swapchain) override
Definition
qopenxrgraphics_opengl.cpp:278
QOpenXRGraphicsOpenGL::QOpenXRGraphicsOpenGL
QOpenXRGraphicsOpenGL()
Definition
qopenxrgraphics_opengl.cpp:53
OpenXRHelpers
Definition
qopenxrhelpers_p.h:30
OpenXRHelpers::checkXrResult
bool checkXrResult(XrResult result, XrInstance instance)
Definition
qopenxrhelpers.cpp:19
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
GL_SRGB8_ALPHA8_EXT
#define GL_SRGB8_ALPHA8_EXT
Definition
qopengles2ext.h:1739
GL_DEPTH_COMPONENT32F
#define GL_DEPTH_COMPONENT32F
Definition
qopenglext.h:994
GL_DEPTH24_STENCIL8
#define GL_DEPTH24_STENCIL8
Definition
qopenglext.h:1012
GL_DEPTH_COMPONENT16
#define GL_DEPTH_COMPONENT16
Definition
qopenglext.h:328
GL_DEPTH_COMPONENT24
#define GL_DEPTH_COMPONENT24
Definition
qopenglext.h:329
GL_RGBA8
#define GL_RGBA8
Definition
qrhigles2.cpp:235
qtquick3d
src
xr
quick3dxr
openxr
qopenxrgraphics_opengl_p.h
Generated on
for Qt by
1.18.0