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
qssgrhiquadrenderer_p.h
Go to the documentation of this file.
1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2020 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5#ifndef QSSGRHIQUADRENDERER_P_H
6#define QSSGRHIQUADRENDERER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick3DRuntimeRender/private/qtquick3druntimerenderglobal_p.h>
20#include <QtQuick3DRuntimeRender/private/qssgrhicontext_p.h>
21
23
24class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRhiQuadRenderer
25{
26public:
27 // The expected usage is one of the following:
28 // prepareQuad() + recordRenderQuadPass() right after each other (to record a full standalone renderpass, in the prepare phase)
29 // prepareQuad() in prepare phase, then recordRenderQuad() in render phase (to draw a quad within the main renderpass)
30
31 enum Flag {
32 UvCoords = 0x01,
33 DepthTest = 0x02,
34 DepthWrite = 0x04,
35 PremulBlend = 0x08,
36 RenderBehind = 0x10
37 };
39
40 void prepareQuad(QSSGRhiContext *rhiCtx, QRhiResourceUpdateBatch *maybeRub);
41
42 void recordRenderQuad(QSSGRhiContext *rhiCtx,
45
46 void recordRenderQuadPass(QSSGRhiContext *rhiCtx,
49
50private:
51 void ensureBuffers(QSSGRhiContext *rhiCtx, QRhiResourceUpdateBatch *rub);
52
53 QSSGRhiBufferPtr m_vbuf;
54 QSSGRhiBufferPtr m_ibuf;
55};
56
57Q_DECLARE_OPERATORS_FOR_FLAGS(QSSGRhiQuadRenderer::Flags)
58
59
60class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRhiCubeRenderer
61{
62public:
63 void prepareCube(QSSGRhiContext *rhiCtx, QRhiResourceUpdateBatch *maybeRub);
64
65 void recordRenderCube(QSSGRhiContext *rhiCtx,
67 QRhiRenderPassDescriptor *rpDesc, QSSGRhiQuadRenderer::Flags flags);
68private:
69 void ensureBuffers(QSSGRhiContext *rhiCtx, QRhiResourceUpdateBatch *rub);
70
71 QSSGRhiBufferPtr m_vbuf;
72 QSSGRhiBufferPtr m_ibuf;
73};
74
75
77
78#endif
\inmodule QtGui
Definition qrhi.h:1142
\inmodule QtGui
Definition qrhi.h:1731
\inmodule QtGui
Definition qrhi.h:1214
\inmodule QtGui
Definition qrhi.h:1184
\inmodule QtQuick3D
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
Flags
GLbitfield flags
std::shared_ptr< QSSGRhiBuffer > QSSGRhiBufferPtr