pub trait Node: 'static + Downcast + Send + Sync {
    fn run(
        &self,
        graph: &mut RenderGraphContext<'_>,
        render_context: &mut RenderContext,
        world: &World
    ) -> Result<(), NodeRunError>; fn input(&self) -> Vec<SlotInfo, Global> { ... } fn output(&self) -> Vec<SlotInfo, Global> { ... } fn update(&mut self, _world: &mut World) { ... } }
Expand description

A render node that can be added to a RenderGraph.

Nodes are the fundamental part of the graph and used to extend its functionality, by generating draw calls and/or running subgraphs. They are added via the render_graph::add_node(my_node) method.

To determine their position in the graph and ensure that all required dependencies (inputs) are already executed, Edges are used.

A node can produce outputs used as dependencies by other nodes. Those inputs and outputs are called slots and are the default way of passing render data inside the graph. For more information see SlotType.

Required Methods

Runs the graph node logic, issues draw calls, updates the output slots and optionally queues up subgraphs for execution. The graph data, input and output values are passed via the RenderGraphContext.

Provided Methods

Specifies the required input slots for this node. They will then be available during the run method inside the RenderGraphContext.

Specifies the produced output slots for this node. They can then be passed one inside RenderGraphContext during the run method.

Updates internal node state using the current render World prior to the run method.

Implementations

Returns true if the trait object wraps an object of type __T.

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Implementors