Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qssgrenderhelpers_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSGRENDERHELPERS_P_H
5#define QSSGRENDERHELPERS_P_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/qtquick3druntimerenderglobal.h>
19
20#include <QtQuick3DUtils/private/qssgaosettings_p.h>
21#include <QtQuick3DRuntimeRender/private/qssgrenderableobjects_p.h>
22
24
25class QSSGRhiContext;
32
34{
35
36std::pair<QSSGBounds3, QSSGBounds3> calculateSortedObjectBounds(const QSSGRenderableObjectList &sortedOpaqueObjects,
37 const QSSGRenderableObjectList &sortedTransparentObjects);
38
40 QSSGPassKey passKey,
42 QSSGRenderShadowMap &shadowMapManager,
44 QSSGRenderCamera *debugCamera,
45 const QSSGShaderLightList &globalLights,
46 const QSSGRenderableObjectList &sortedOpaqueObjects,
48 const QSSGBounds3 &castingObjectsBox,
49 const QSSGBounds3 &receivingObjectsBox);
50
52 QSSGPassKey passKey,
53 const QSSGLayerRenderData &inData,
55 QSSGRenderReflectionMap &reflectionMapManager,
56 const QVector<QSSGRenderReflectionProbe *> &reflectionProbes,
57 const QSSGRenderableObjectList &reflectionPassObjects,
59
61 QSSGPassKey passKey,
62 const QSSGRhiGraphicsPipelineState &basePipelineState,
64 QSSGLayerRenderData &inData,
65 const QSSGRenderableObjectList &sortedOpaqueObjects,
66 const QSSGRenderableObjectList &sortedTransparentObjects,
67 int samples,
68 int viewCount);
69
71 const QSSGRenderableObjectList &sortedOpaqueObjects,
72 const QSSGRenderableObjectList &sortedTransparentObjects,
73 bool *needsSetViewport);
74
75bool rhiPrepareAoTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex);
76
78 QSSGPassKey passKey,
80 QSSGRhiShaderPipeline &shaderPipeline,
83 const QSSGRhiRenderableTexture &rhiAoTexture,
84 const QSSGRhiRenderableTexture &rhiDepthTexture,
86
87bool rhiPrepareScreenTexture(QSSGRhiContext *rhiCtx, const QSize &size, bool wantsMips, QSSGRhiRenderableTexture *renderableTex);
88
90 QSSGPassKey passKey,
92 QSSGRenderCameraList &cameras,
94
95
97 QSSGPassKey passKey,
99 QSSGRenderCameraList &cameras,
101
103 QSSGPassKey passKey,
105 QSSGRenderCamera &inCamera,
109
110Q_QUICK3DRUNTIMERENDER_EXPORT void rhiPrepareRenderable(QSSGRhiContext *rhiCtx,
111 QSSGPassKey passKey,
112 const QSSGLayerRenderData &inData,
113 QSSGRenderableObject &inObject,
114 QRhiRenderPassDescriptor *renderPassDescriptor,
116 QSSGShaderFeatures featureSet,
117 int samples,
118 int viewCount,
119 QSSGRenderCamera *alteredCamera = nullptr,
120 QMatrix4x4 *alteredModelViewProjection = nullptr,
122 QSSGReflectionMapEntry *entry = nullptr);
123
124Q_QUICK3DRUNTIMERENDER_EXPORT void rhiRenderRenderable(QSSGRhiContext *rhiCtx,
126 QSSGRenderableObject &object,
127 bool *needsSetViewport,
129
130bool rhiPrepareDepthTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex);
131
132inline QRect correctViewportCoordinates(const QRectF &layerViewport, const QRect &deviceRect)
133{
134 const int y = deviceRect.bottom() - layerViewport.bottom() + 1;
135 return QRect(layerViewport.x(), y, layerViewport.width(), layerViewport.height());
136}
137}
138
140
141
142#endif // QSSGRENDERHELPERS_P_H
Definition qlist.h:76
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
Definition qrect.h:182
\inmodule QtGui
Definition qrhi.h:1143
Class representing 3D range or axis aligned bounding box.
\inmodule QtQuick3D
\inmodule QtCore
Definition qsize.h:25
QCamera * camera
Definition camera.cpp:19
else opt state
[0]
Combined button and popup list for selecting options.
void rhiRenderShadowMap(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, QSSGRhiGraphicsPipelineState &ps, QSSGRenderShadowMap &shadowMapManager, const QSSGRenderCamera &camera, QSSGRenderCamera *debugCamera, const QSSGShaderLightList &globalLights, const QSSGRenderableObjectList &sortedOpaqueObjects, QSSGRenderer &renderer, const QSSGBounds3 &castingObjectsBox, const QSSGBounds3 &receivingObjectsBox)
void rhiPrepareGrid(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, QSSGRenderLayer &layer, QSSGRenderCameraList &cameras, QSSGRenderer &renderer)
bool rhiPrepareScreenTexture(QSSGRhiContext *rhiCtx, const QSize &size, bool wantsMips, QSSGRhiRenderableTexture *renderableTex)
void rhiPrepareSkyBoxForReflectionMap(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, QSSGRenderLayer &layer, QSSGRenderCamera &inCamera, QSSGRenderer &renderer, QSSGReflectionMapEntry *entry, QSSGRenderTextureCubeFace cubeFace)
void rhiRenderAoTexture(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, QSSGRenderer &renderer, QSSGRhiShaderPipeline &shaderPipeline, QSSGRhiGraphicsPipelineState &ps, const QSSGAmbientOcclusionSettings &ao, const QSSGRhiRenderableTexture &rhiAoTexture, const QSSGRhiRenderableTexture &rhiDepthTexture, const QSSGRenderCamera &camera)
bool rhiPrepareAoTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex)
bool rhiPrepareDepthTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex)
Q_QUICK3DRUNTIMERENDER_EXPORT void rhiRenderRenderable(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &state, QSSGRenderableObject &object, bool *needsSetViewport, QSSGRenderTextureCubeFace cubeFace=QSSGRenderTextureCubeFaceNone)
bool rhiPrepareDepthPass(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGRhiGraphicsPipelineState &basePipelineState, QRhiRenderPassDescriptor *rpDesc, QSSGLayerRenderData &inData, const QSSGRenderableObjectList &sortedOpaqueObjects, const QSSGRenderableObjectList &sortedTransparentObjects, int samples, int viewCount)
std::pair< QSSGBounds3, QSSGBounds3 > calculateSortedObjectBounds(const QSSGRenderableObjectList &sortedOpaqueObjects, const QSSGRenderableObjectList &sortedTransparentObjects)
QRect correctViewportCoordinates(const QRectF &layerViewport, const QRect &deviceRect)
void rhiPrepareSkyBox(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, QSSGRenderLayer &layer, QSSGRenderCameraList &cameras, QSSGRenderer &renderer)
Q_QUICK3DRUNTIMERENDER_EXPORT void rhiPrepareRenderable(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGLayerRenderData &inData, QSSGRenderableObject &inObject, QRhiRenderPassDescriptor *renderPassDescriptor, QSSGRhiGraphicsPipelineState *ps, QSSGShaderFeatures featureSet, int samples, int viewCount, QSSGRenderCamera *alteredCamera=nullptr, QMatrix4x4 *alteredModelViewProjection=nullptr, QSSGRenderTextureCubeFace cubeFace=QSSGRenderTextureCubeFaceNone, QSSGReflectionMapEntry *entry=nullptr)
void rhiRenderReflectionMap(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGLayerRenderData &inData, QSSGRhiGraphicsPipelineState *ps, QSSGRenderReflectionMap &reflectionMapManager, const QVector< QSSGRenderReflectionProbe * > &reflectionProbes, const QSSGRenderableObjectList &reflectionPassObjects, QSSGRenderer &renderer)
void rhiRenderDepthPass(QSSGRhiContext *rhiCtx, const QSSGRhiGraphicsPipelineState &ps, const QSSGRenderableObjectList &sortedOpaqueObjects, const QSSGRenderableObjectList &sortedTransparentObjects, bool *needsSetViewport)
EGLOutputLayerEXT layer
GLsizei samples
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint y
GLuint entry
QSSGRenderTextureCubeFace
constexpr QSSGRenderTextureCubeFace QSSGRenderTextureCubeFaceNone
QSvgRenderer * renderer
[0]