1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSG_RHI_PARTICLES_H
5#define QSSG_RHI_PARTICLES_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/qssgrenderableobjects_p.h>
20#include <QtQuick3DRuntimeRender/private/qssgrenderparticles_p.h>
21#include <QtGui/QMatrix4x4>
22#include <QtGui/QMatrix3x3>
23
24QT_BEGIN_NAMESPACE
25
26class QSSGLayerRenderData;
27struct QSSGRenderableImage;
28struct QSSGRenderLayer;
29struct QSSGRenderLight;
30struct QSSGRenderCamera;
31struct QSSGReflectionMapEntry;
32class QRhiTexture;
33
34class QSSGParticleRenderer
35{
36public:
37 static void updateUniformsForParticles(QSSGRhiShaderPipeline &shaderPipeline,
38 QSSGRhiContext *rhiCtx,
39 char *ubufData,
40 QSSGParticlesRenderable &renderable,
41 QSSGRenderCamera &inCamera);
42 static void updateUniformsForParticleModel(QSSGRhiShaderPipeline &shaderPipeline,
43 char *ubufData,
44 const QSSGRenderModel *model, quint32 offset);
45
46 static void rhiPrepareRenderable(QSSGRhiShaderPipeline &shaderPipeline, QSSGPassKey passKey,
47 QSSGRhiContext *rhiCtx,
48 QSSGRhiGraphicsPipelineState *ps,
49 QSSGParticlesRenderable &renderable,
50 const QSSGLayerRenderData &inData,
51 QRhiRenderPassDescriptor *renderPassDescriptor,
52 int samples,
53 QSSGRenderCamera *camera = nullptr,
54 QSSGRenderTextureCubeFace cubeFace = QSSGRenderTextureCubeFaceNone,
55 QSSGReflectionMapEntry *entry = nullptr);
56 static void rhiRenderRenderable(QSSGRhiContext *rhiCtx,
57 QSSGParticlesRenderable &renderable,
58 bool *needsSetViewport,
59 QSSGRenderTextureCubeFace cubeFace,
60 const QSSGRhiGraphicsPipelineState &state);
61 static void prepareParticlesForModel(QSSGRhiShaderPipeline &shaderPipeline,
62 QSSGRhiContext *rhiCtx,
63 QSSGRhiShaderResourceBindingList &bindings,
64 const QSSGRenderModel *model);
65};
66
67QT_END_NAMESPACE
68
69#endif
70

source code of qtquick3d/src/runtimerender/qssgrhiparticles_p.h