Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qssgrenderreflectionmap_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSG_RENDER_REFLECTION_MAP_H
5#define QSSG_RENDER_REFLECTION_MAP_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick3DRuntimeRender/private/qtquick3druntimerenderglobal_p.h>
19#include <QtQuick3DRuntimeRender/private/qssgrenderreflectionprobe_p.h>
20
22
23class QRhi;
25class QSSGRhiContext;
27
31class QRhiTexture;
34class QRhiBuffer;
35
37{
39
41 QRhiTexture *preFiltered);
44 QRhiTexture *prefiltered,
45 QRhiRenderBuffer *depthStencil);
46
49
51
52 // RHI resources
58
69
71
73
74 bool m_needsRender = false;
75 bool m_rendered = false;
76
81};
82
83class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderReflectionMap
84{
86 Q_DISABLE_COPY(QSSGRenderReflectionMap)
87
88public:
90
91 explicit QSSGRenderReflectionMap(const QSSGRenderContextInterface &inContext);
93 void releaseCachedResources();
94
95 void addReflectionMapEntry(qint32 probeIdx, const QSSGRenderReflectionProbe &probe);
96 void addTexturedReflectionMapEntry(qint32 probeIdx, const QSSGRenderReflectionProbe &probe);
97
98 QSSGReflectionMapEntry *reflectionMapEntry(int probeIdx);
99
100 qint32 reflectionMapEntryCount() { return m_reflectionMapList.size(); }
101
102private:
103 TReflectionMapEntryList m_reflectionMapList;
104};
105
106using QSSGRenderReflectionMapPtr = std::shared_ptr<QSSGRenderReflectionMap>;
107
109
110#endif
Definition qlist.h:74
Definition qmap.h:186
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtGui
Definition qrhi.h:834
\inmodule QtGui
Definition qrhi.h:1614
\inmodule QtGui
Definition qrhi.h:1241
\inmodule QtGui
Definition qrhi.h:1071
\inmodule QtGui
Definition qrhi.h:1119
\inmodule QtGui
Definition qrhi.h:1190
\inmodule QtGui
Definition qrhi.h:1161
\inmodule QtGui
Definition qrhi.h:883
\inmodule QtGui
Definition qrhi.h:1767
const QSSGRenderContextInterface & m_context
Combined button and popup list for selecting options.
static void * context
#define Q_QUICK3D_PROFILE_ID
static constexpr QSSGRenderTextureCubeFace QSSGRenderTextureCubeFaces[]
QSSGRenderTextureCubeFace
std::shared_ptr< QSSGRenderReflectionMap > QSSGRenderReflectionMapPtr
unsigned int quint32
Definition qtypes.h:45
int qint32
Definition qtypes.h:44
QJSValue cube
QVarLengthArray< QRhiTextureRenderTarget *, 6 > m_rhiRenderTargets
QSSGRenderReflectionProbe::ReflectionTimeSlicing m_timeSlicing
QVarLengthArray< QRhiShaderResourceBindings *, 6 > m_skyBoxSrbs
static QSSGReflectionMapEntry withRhiTexturedCubeMap(quint32 probeIdx, QRhiTexture *preFiltered)
QRhiRenderPassDescriptor * m_rhiRenderPassDesc
static QSSGReflectionMapEntry withRhiCubeMap(quint32 probeIdx, QRhiTexture *cube, QRhiTexture *prefiltered, QRhiRenderBuffer *depthStencil)
QRhiShaderResourceBindings * m_irradianceSrb
QRhiShaderResourceBindings * m_prefilterSrb
QMap< int, QSize > m_prefilterMipLevelSizes
void renderMips(QSSGRhiContext *context)
QRhiRenderPassDescriptor * m_rhiPrefilterRenderPassDesc
QRhiGraphicsPipeline * m_irradiancePipeline
QRhiGraphicsPipeline * m_prefilterPipeline
QMap< int, QVarLengthArray< QRhiTextureRenderTarget *, 6 > > m_rhiPrefilterRenderTargetsMap
QSSGRenderTextureCubeFace m_timeSliceFace