Root data model for visual nodes. More...
Detailed Description
Root data model for visual nodes.
Public Member Functions | |
| Node (const Node &)=delete | |
| Node (Node &&)=delete | |
| Node & | operator= (const Node &)=delete |
| Node & | operator= (Node &&)=delete |
| virtual NodeRenderer * | createRenderer (RenderList &r) const noexcept=0 |
| Create a renderer in a given context for this node. | |
| virtual void | renderedNodesChanged () |
| Whenever render nodes are added / removed. | |
| virtual void | process (Message &&msg) |
| Process a message from the execution engine. | |
| virtual void | update () |
| void | materialChange () noexcept |
| Used to notify a material change from the model to the renderers. | |
| bool | hasMaterialChanged (int64_t &renderer) const noexcept |
| void | renderTargetChange () noexcept |
| Used to notify a render target (texture inlet) change from the model to the renderers. | |
| bool | hasRenderTargetChanged (int64_t &renderer) const noexcept |
| bool | hasExplicitRenderTargetSize (int32_t port) const noexcept |
| Whether a given port has a user-specified render target size. | |
| bool | hasExplicitRenderTargetSpecs (int32_t port) const noexcept |
| Whether the user set a size or a format on a texture inlet. | |
| QSize | resolveRenderTargetSize (int32_t port, RenderList &renderer) const noexcept |
| RenderTargetSpecs | resolveRenderTargetSpecs (int32_t port, RenderList &renderer) const noexcept |
| std::optional< RenderTargetSpecs > | firstInputRenderTargetSpecs () const noexcept |
| What the first texture input asks to be rendered into. | |
| void | process (int32_t port, const ossia::render_target_spec &v) |
Public Attributes | |
| std::vector< Port * > | input |
| Input ports of that node. | |
| ossia::small_pod_vector< Port *, 1 > | output |
| Output ports of that node. | |
| ossia::flat_map< RenderList *, score::gfx::NodeRenderer * > | renderedNodes |
| Map associating each RenderList to a Renderer for this model. | |
| ossia::flat_map< int32_t, ossia::render_target_spec > | renderTargetSpecs |
| Render target info. | |
| std::atomic_int64_t | materialChanged {0} |
| std::atomic_int64_t | renderTargetSpecChanged {-1} |
| int32_t | nodeId = score::gfx::invalid_node_index |
| bool | requiresDepth {} |
Member Function Documentation
◆ createRenderer()
|
pure virtualnoexcept |
Create a renderer in a given context for this node.
Implemented in score::gfx::GaussianSplatNode, score::gfx::BackgroundNode, score::gfx::DirectVideoOutputNode, score::gfx::DMACaptureInputNode, score::gfx::FlattenedSceneFilterNode, score::gfx::GeometryFilterNode, score::gfx::ImagesNode, score::gfx::FullScreenImageNode, score::gfx::ISFNode, score::gfx::KmsOutputNode, score::gfx::MergeGeometriesNode, score::gfx::MultiWindowNode, score::gfx::NodeModel, score::gfx::SceneFilterNode, score::gfx::ScenePreprocessorNode, score::gfx::ScreenNode, score::gfx::SinkNode, score::gfx::TexgenNode, score::gfx::TextNode, score::gfx::VideoNode, score::gfx::ModelDisplayNode, score::gfx::OutputNode, score::gfx::PreviewNode, Gfx::GStreamer::GStreamerOutputNode, Gfx::LibavEncoderNode, Gfx::PipeWire::PipewireOutputNode, Gfx::Sh4ltOutputNode, Gfx::ShmdataOutputNode, Gfx::Spout::SpoutInputNode, Gfx::SpoutNode, and Gfx::WindowCapture::WindowCaptureNode.
◆ firstInputRenderTargetSpecs()
|
noexcept |
What the first texture input asks to be rendered into.
For an output node with no surface of its own – no window, no encoder, nothing that fixes a resolution – this is the only thing in the graph that says what size and format to render at. Available before any RenderList exists, which is when such a node has to build its device.
Empty when no texture input carries a spec; size is invalid when the input names a format but no size.
◆ hasExplicitRenderTargetSize()
|
inlinenoexcept |
Whether a given port has a user-specified render target size.
Returns true only if the user explicitly set a size via render_target_spec. Used by backward size propagation to decide whether to inherit the downstream render target size.
◆ hasExplicitRenderTargetSpecs()
|
inlinenoexcept |
Whether the user set a size or a format on a texture inlet.
A format other than RGBA8 counts as set even without format_set.
◆ process()
|
virtual |
Process a message from the execution engine.
Reimplemented in score::gfx::ProcessNode, score::gfx::GeometryFilterNode, score::gfx::GeometryFilterNode, score::gfx::ISFNode, score::gfx::ISFNode, score::gfx::ProcessNode, score::gfx::SinkNode, score::gfx::TextNode, score::gfx::VideoNode, score::gfx::ModelDisplayNode, and score::gfx::GaussianSplatNode.
Member Data Documentation
◆ output
| ossia::small_pod_vector<Port*, 1> score::gfx::Node::output |
Output ports of that node.
Most of the time there will be a single image output.
◆ renderTargetSpecs
| ossia::flat_map<int32_t, ossia::render_target_spec> score::gfx::Node::renderTargetSpecs |
Render target info.
Each texture inlet will have a matching spec
The documentation for this class was generated from the following files:
- score-plugin-gfx/Gfx/Graph/Node.hpp
- Node.cpp