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.cpp
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
5#include "private/qssgassert_p.h"
6#include "private/qssglayerrenderdata_p.h"
8
10
29{
30 using RenderResultT = std::underlying_type_t<RenderResult>;
31 const QSSGRhiRenderableTexture *res = nullptr;
33 if (QSSG_GUARD(data && (std::size(data->renderResults) > RenderResultT(id))))
34 res = data->getRenderResult(id);
35
36 return res ? Result{ res->texture, res->depthStencil } : Result{};
37}
38
43{
45 QSSG_ASSERT(data, return {});
46 return data->getPipelineState();
47}
48
53{
56 QSSG_ASSERT(data, return ret);
57 if (auto *ac = data->activeCamera())
59
60 return ret;
61}
62
67
68void QSSGFrameData::clear()
69{
70
71}
72
73QSSGLayerRenderData *QSSGFrameData::getCurrent() const
74{
76}
77
78QSSGFrameData::QSSGFrameData(QSSGRenderContextInterface *ctx)
79 : m_ctx(ctx)
80{
81
82}
83
99
104
143{
144 Q_UNUSED(data);
145 return false;
146}
147
162
175
184
192
200
\inmodule QtQuick3D
QSSGRenderContextInterface * contextInterface() const
Result getRenderResult(RenderResult id) const
QSSGCameraId activeCamera() const
QSSGRhiGraphicsPipelineState getPipelineState() const
static QSSGLayerRenderData * getCurrent(const QSSGRenderer &renderer)
const std::unique_ptr< QSSGRenderer > & renderer() const
virtual void resetForFrame()=0
Called each time a new frame starts.
RenderMode
Specifies the render extension mode.
virtual RenderMode mode() const =0
RenderStage
Specifies the order the extension will be called.
virtual void render(QSSGFrameData &data)=0
Record the render pass.
virtual void prepareRender(QSSGFrameData &data)=0
Prepare data for rendering.
virtual RenderStage stage() const =0
virtual bool prepareData(QSSGFrameData &data)=0
Called after scene data is collected, but before any render data or rendering in the current frame ha...
EGLContext ctx
constexpr QSSGCameraId getCameraId(const QSSGRenderGraphObject &o)
Combined button and popup list for selecting options.
return ret
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint res
#define QSSG_ASSERT(cond, action)
#define QSSG_GUARD(cond)
#define Q_UNUSED(x)
Definition moc.h:23