2 #include <Gfx/Graph/Node.hpp>
22 inputAboutToFinish(
RenderList& renderer,
const Port& p, QRhiResourceUpdateBatch*&);
24 virtual void init(
RenderList& renderer, QRhiResourceUpdateBatch& res) = 0;
25 virtual void update(
RenderList& renderer, QRhiResourceUpdateBatch& res) = 0;
27 virtual void runInitialPasses(
28 RenderList&, QRhiCommandBuffer& commands, QRhiResourceUpdateBatch*& res,
31 virtual void runRenderPass(
RenderList&, QRhiCommandBuffer& commands,
Edge& edge);
36 using PassMap = ossia::small_vector<std::pair<Edge*, Pipeline>, 2>;
37 SCORE_PLUGIN_GFX_EXPORT
38 void defaultPassesInit(
39 PassMap& passes,
const std::vector<Edge*>& edges,
RenderList& renderer,
40 const Mesh& mesh,
const QShader& v,
const QShader& f, QRhiBuffer* processUBO,
41 QRhiBuffer* matUBO,
const std::vector<Sampler>& samplers,
42 std::span<QRhiShaderResourceBinding> additionalBindings = {});
44 SCORE_PLUGIN_GFX_EXPORT
45 void defaultRenderPass(
46 RenderList& renderer,
const Mesh& mesh,
const MeshBuffers& bufs,
47 QRhiCommandBuffer& cb, Edge& edge, PassMap& passes);
49 SCORE_PLUGIN_GFX_EXPORT
51 RenderList& renderer,
const MeshBuffers& bufs, QRhiCommandBuffer& cb, Edge& edge,
73 std::vector<Sampler> m_samplers;
83 QRhiBuffer* m_processUBO{};
86 int64_t materialChangedIndex{-1};
87 int64_t geometryChangedIndex{-1};
93 defaultMeshInit(
RenderList& renderer,
const Mesh& mesh, QRhiResourceUpdateBatch& res);
96 void defaultPassesInit(
97 RenderList& renderer,
const Mesh& mesh,
const QShader& v,
const QShader& f,
98 std::span<QRhiShaderResourceBinding> additionalBindings = {});
100 void init(
RenderList& renderer, QRhiResourceUpdateBatch& res)
override;
102 void defaultUBOUpdate(
RenderList& renderer, QRhiResourceUpdateBatch& res);
103 void defaultMeshUpdate(
RenderList& renderer, QRhiResourceUpdateBatch& res);
104 void update(
RenderList& renderer, QRhiResourceUpdateBatch& res)
override;
109 void defaultRenderPass(
112 void defaultRenderPass(
116 void runRenderPass(
RenderList&, QRhiCommandBuffer& commands,
Edge& edge)
override;
Generic renderer.
Definition: NodeRenderer.hpp:61
Common base class for most single-pass, simple nodes.
Definition: score-plugin-gfx/Gfx/Graph/Node.hpp:181
Renderer for a given node.
Definition: NodeRenderer.hpp:11
List of nodes to be rendered to an output.
Definition: RenderList.hpp:19
Graphics rendering pipeline for ossia score.
Definition: Filter/PreviewWidget.hpp:12
Utility to represent a shader material following score conventions.
Definition: score-plugin-gfx/Gfx/Graph/Utils.hpp:247
Connection between two score::gfx::Port.
Definition: score-plugin-gfx/Gfx/Graph/Utils.hpp:66
Data model for meshes.
Definition: Mesh.hpp:23
Port of a score::gfx::Node.
Definition: score-plugin-gfx/Gfx/Graph/Utils.hpp:48
Useful abstraction for storing all the data related to a render target.
Definition: score-plugin-gfx/Gfx/Graph/Utils.hpp:111