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<QSSGBoxPoints, QSSGBoxPoints> calculateSortedObjectBounds(const QSSGRenderableObjectList &sortedOpaqueObjects,
37 const QSSGRenderableObjectList &sortedTransparentObjects);
38
40 QSSGPassKey passKey,
42 QSSGRenderShadowMap &shadowMapManager,
44 const QSSGShaderLightList &globalLights,
45 const QSSGRenderableObjectList &sortedOpaqueObjects,
47 const QSSGBoxPoints &castingObjectsBox,
48 const QSSGBoxPoints &receivingObjectsBox);
49
51 QSSGPassKey passKey,
52 const QSSGLayerRenderData &inData,
54 QSSGRenderReflectionMap &reflectionMapManager,
55 const QVector<QSSGRenderReflectionProbe *> &reflectionProbes,
56 const QSSGRenderableObjectList &reflectionPassObjects,
58
60 QSSGPassKey passKey,
61 const QSSGRhiGraphicsPipelineState &basePipelineState,
63 QSSGLayerRenderData &inData,
64 const QSSGRenderableObjectList &sortedOpaqueObjects,
65 const QSSGRenderableObjectList &sortedTransparentObjects,
66 int samples,
67 int viewCount);
68
70 const QSSGRenderableObjectList &sortedOpaqueObjects,
71 const QSSGRenderableObjectList &sortedTransparentObjects,
72 bool *needsSetViewport);
73
74bool rhiPrepareAoTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex);
75
77 QSSGPassKey passKey,
79 QSSGRhiShaderPipeline &shaderPipeline,
82 const QSSGRhiRenderableTexture &rhiAoTexture,
83 const QSSGRhiRenderableTexture &rhiDepthTexture,
85
86bool rhiPrepareScreenTexture(QSSGRhiContext *rhiCtx, const QSize &size, bool wantsMips, QSSGRhiRenderableTexture *renderableTex);
87
89 QSSGPassKey passKey,
91 QSSGRenderCameraList &cameras,
93
94
96 QSSGPassKey passKey,
98 QSSGRenderCameraList &cameras,
100
102 QSSGPassKey passKey,
104 QSSGRenderCamera &inCamera,
108
109Q_QUICK3DRUNTIMERENDER_EXPORT void rhiPrepareRenderable(QSSGRhiContext *rhiCtx,
110 QSSGPassKey passKey,
111 const QSSGLayerRenderData &inData,
112 QSSGRenderableObject &inObject,
113 QRhiRenderPassDescriptor *renderPassDescriptor,
115 QSSGShaderFeatures featureSet,
116 int samples,
117 int viewCount,
118 QSSGRenderCamera *alteredCamera = nullptr,
119 QMatrix4x4 *alteredModelViewProjection = nullptr,
121 QSSGReflectionMapEntry *entry = nullptr);
122
123Q_QUICK3DRUNTIMERENDER_EXPORT void rhiRenderRenderable(QSSGRhiContext *rhiCtx,
125 QSSGRenderableObject &object,
126 bool *needsSetViewport,
128
129bool rhiPrepareDepthTexture(QSSGRhiContext *rhiCtx, const QSize &size, QSSGRhiRenderableTexture *renderableTex);
130
131inline QRect correctViewportCoordinates(const QRectF &layerViewport, const QRect &deviceRect)
132{
133 const int y = deviceRect.bottom() - layerViewport.bottom() + 1;
134 return QRect(layerViewport.x(), y, layerViewport.width(), layerViewport.height());
135}
136}
137
139
140
141#endif // QSSGRENDERHELPERS_P_H
Definition qlist.h:75
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:1142
\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 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)
std::pair< QSSGBoxPoints, QSSGBoxPoints > calculateSortedObjectBounds(const QSSGRenderableObjectList &sortedOpaqueObjects, const QSSGRenderableObjectList &sortedTransparentObjects)
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)
void rhiRenderShadowMap(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, QSSGRhiGraphicsPipelineState &ps, QSSGRenderShadowMap &shadowMapManager, const QSSGRenderCamera &camera, const QSSGShaderLightList &globalLights, const QSSGRenderableObjectList &sortedOpaqueObjects, QSSGRenderer &renderer, const QSSGBoxPoints &castingObjectsBox, const QSSGBoxPoints &receivingObjectsBox)
bool rhiPrepareDepthPass(QSSGRhiContext *rhiCtx, QSSGPassKey passKey, const QSSGRhiGraphicsPipelineState &basePipelineState, QRhiRenderPassDescriptor *rpDesc, QSSGLayerRenderData &inData, const QSSGRenderableObjectList &sortedOpaqueObjects, const QSSGRenderableObjectList &sortedTransparentObjects, int samples, int viewCount)
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
std::array< QVector3D, 8 > QSSGBoxPoints
QSSGRenderTextureCubeFace
constexpr QSSGRenderTextureCubeFace QSSGRenderTextureCubeFaceNone
QSvgRenderer * renderer
[0]