2#include <Gfx/Graph/CommonUBOs.hpp>
3#include <Gfx/Graph/Node.hpp>
21 std::shared_ptr<RenderState> m_state;
37 [[nodiscard]] QRhiResourceUpdateBatch* initialBatch()
const noexcept;
45 MeshBuffers initMeshBuffer(
const Mesh& mesh, QRhiResourceUpdateBatch& res);
50 void update(QRhiResourceUpdateBatch& res);
55 void render(QRhiCommandBuffer& commands,
bool force =
false);
62 void releaseBuffer(QRhiBuffer* buf);
67 bool maybeRebuild(
bool force =
false);
84 QImage adaptImage(
const QImage& in);
96 using Buffers = std::pair<const Mesh* const, MeshBuffers>;
98 const ossia::geometry_spec&, QRhiResourceUpdateBatch& res,
const Mesh* current,
104 std::vector<score::gfx::Node*>
nodes;
112 void clearRenderers();
125 QRhiBuffer&
outputUBO() const noexcept {
return *m_outputUBO; }
135 const
score::gfx::
Mesh& defaultTriangle() const noexcept;
142 bool requiresDepth(
score::gfx::
Port& p) const noexcept;
143 bool anyNodeRequiresDepth() const noexcept {
return m_requiresDepth; }
145 int samples() const noexcept {
return m_samples; }
147 bool canRender() const noexcept {
return m_ready; }
149 QSize renderSize(
const Edge* e)
const noexcept;
154 OutputUBO m_outputUBOData;
156 QRhiResourceUpdateBatch* m_initialBatch{};
159 QRhiBuffer* m_outputUBO{};
160 QRhiTexture* m_emptyTexture{};
165 ossia::flat_map<Mesh*, MeshBuffers> m_vertexBuffers;
167 ossia::flat_map<ossia::geometry_spec, Mesh*> m_customMeshCache;
178 bool m_requiresDepth{};
Base class for sink nodes (QWindow, spout, syphon, NDI output, ...)
Definition OutputNode.hpp:24
List of nodes to be rendered to an output.
Definition RenderList.hpp:19
QRhiBuffer & outputUBO() const noexcept
UBO corresponding to the output parameters:
Definition RenderList.hpp:125
std::vector< score::gfx::NodeRenderer * > renderers
Renderers - one per node.
Definition RenderList.hpp:109
std::vector< score::gfx::Node * > nodes
Nodes present in this RenderList, in order.
Definition RenderList.hpp:104
RenderState & state
RenderState corresponding to this RenderList.
Definition RenderList.hpp:94
QRhiTexture & emptyTexture() const noexcept
Texture to use when a texture is missing.
Definition RenderList.hpp:117
OutputNode & output
Output node to which this RenderList is rendering to.
Definition RenderList.hpp:89
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
Base toolkit upon which the software is built.
Definition Application.cpp:99
Connection between two score::gfx::Port.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:71
Data model for meshes.
Definition Mesh.hpp:30
Port of a score::gfx::Node.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:53
Global state associated to a rendering context.
Definition RenderState.hpp:35
Useful abstraction for storing all the data related to a render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:116