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
qssgrenderextensions.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 QSSGRENDEREXTENSIIONS_H
5#define QSSGRENDEREXTENSIIONS_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the QtQuick3D API, with limited compatibility guarantees.
12// Usage of this API may make your code source and binary incompatible with
13// future versions of Qt.
14//
15
16#include <QtQuick3DRuntimeRender/qtquick3druntimerenderexports.h>
17#include <ssg/qssgrenderbasetypes.h>
18#include <ssg/qssgrendergraphobject.h>
19#include <ssg/qssgrhicontext.h>
20#include <QtCore/qobject.h>
21
23
26class QRhiTexture;
28
29class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGFrameData
30{
31public:
32 enum class RenderResult : quint32
33 {
37 };
38
39 struct Result
40 {
41 QRhiTexture *texture = nullptr;
43 };
44
45 Result getRenderResult(RenderResult id) const;
46
47 [[nodiscard]] QSSGRhiGraphicsPipelineState getPipelineState() const;
48
49 [[nodiscard]] QSSGCameraId activeCamera() const;
50
51 [[nodiscard]] QSSGRenderContextInterface *contextInterface() const;
52
53private:
54 friend class QSSGLayerRenderData;
55 friend class QSSGRenderHelpers;
56
57 void clear();
58
59 [[nodiscard]] QSSGLayerRenderData *getCurrent() const;
60
61 QSSGFrameData() = default;
63 QSSGRenderContextInterface *m_ctx = nullptr;
64};
65
66class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderExtension : public QSSGRenderGraphObject
67{
68public:
69 enum class RenderMode
70 {
71 Standalone,
72 Main
73 };
74
75 enum class RenderStage
76 {
77 PreColor,
78 PostColor
79 };
80
82 virtual ~QSSGRenderExtension();
83
84 virtual bool prepareData(QSSGFrameData &data) = 0;
85 virtual void prepareRender(QSSGFrameData &data) = 0;
86 virtual void render(QSSGFrameData &data) = 0;
87
88 virtual void resetForFrame() = 0;
89
90 virtual RenderMode mode() const = 0;
91 virtual RenderStage stage() const = 0;
92};
93
95
96#endif // QSSGRENDEREXTENSIIONS_H
int(* Main)(int, char **)
\inmodule QtGui
Definition qrhi.h:1094
\inmodule QtGui
Definition qrhi.h:895
\inmodule QtQuick3D
\inmodule QtQuick3D
RenderMode
Specifies the render extension mode.
RenderStage
Specifies the order the extension will be called.
\inmodule QtQuick3D
EGLContext ctx
b clear()
Combined button and popup list for selecting options.
GLenum mode
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint buffer
GLenum GLuint texture
unsigned int quint32
Definition qtypes.h:50
myWidget render(this)