Loading...
Searching...
No Matches
score::gfx::Node Class Referenceabstract

Root data model for visual nodes. More...

Inheritance diagram for score::gfx::Node:
score::gfx::OutputNode score::gfx::ProcessNode Gfx::GStreamer::GStreamerOutputNode Gfx::LibavEncoderNode Gfx::PipeWire::PipewireOutputNode Gfx::Sh4ltOutputNode Gfx::ShmdataOutputNode Gfx::SpoutNode score::gfx::BackgroundNode score::gfx::DirectVideoOutputNode score::gfx::KmsOutputNode score::gfx::MultiWindowNode score::gfx::PreviewNode score::gfx::ScreenNode score::gfx::SinkNode Gfx::Spout::SpoutInputNode Gfx::WindowCapture::WindowCaptureNode score::gfx::DMACaptureInputNode score::gfx::FlattenedSceneFilterNode score::gfx::GeometryFilterNode score::gfx::ISFNode score::gfx::MergeGeometriesNode score::gfx::NodeModel score::gfx::SceneFilterNode score::gfx::ScenePreprocessorNode score::gfx::VideoNodeBase

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()

◆ firstInputRenderTargetSpecs()

std::optional< RenderTargetSpecs > score::gfx::Node::firstInputRenderTargetSpecs ( ) const
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()

bool score::gfx::Node::hasExplicitRenderTargetSize ( int32_t  port) const
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()

bool score::gfx::Node::hasExplicitRenderTargetSpecs ( int32_t  port) const
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()

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: