rendy_graph

Trait NodeBuilder

Source
pub trait NodeBuilder<B: Backend, T: ?Sized>: Debug {
    // Required methods
    fn family(
        &self,
        factory: &mut Factory<B>,
        families: &Families<B>,
    ) -> Option<FamilyId>;
    fn buffers(&self) -> Vec<(BufferId, BufferAccess)>;
    fn images(&self) -> Vec<(ImageId, ImageAccess)>;
    fn dependencies(&self) -> Vec<NodeId>;
    fn build<'a>(
        self: Box<Self>,
        ctx: &GraphContext<B>,
        factory: &mut Factory<B>,
        family: &mut Family<B>,
        queue: usize,
        aux: &T,
        buffers: Vec<NodeBuffer>,
        images: Vec<NodeImage>,
    ) -> Result<Box<dyn DynNode<B, T>>, NodeBuildError>;
}
Expand description

Dynamic node builder that emits DynNode.

Required Methods§

Source

fn family( &self, factory: &mut Factory<B>, families: &Families<B>, ) -> Option<FamilyId>

Pick family for this node to be executed onto.

Source

fn buffers(&self) -> Vec<(BufferId, BufferAccess)>

Get buffer accessed by the node.

Source

fn images(&self) -> Vec<(ImageId, ImageAccess)>

Get images accessed by the node.

Source

fn dependencies(&self) -> Vec<NodeId>

Indices of nodes this one dependes on.

Source

fn build<'a>( self: Box<Self>, ctx: &GraphContext<B>, factory: &mut Factory<B>, family: &mut Family<B>, queue: usize, aux: &T, buffers: Vec<NodeBuffer>, images: Vec<NodeImage>, ) -> Result<Box<dyn DynNode<B, T>>, NodeBuildError>

Build node.

Implementors§

Source§

impl<B, T> NodeBuilder<B, T> for PresentBuilder<B>
where B: Backend, T: ?Sized,

Source§

impl<B, T> NodeBuilder<B, T> for RenderPassNodeBuilder<B, T>
where B: Backend, T: ?Sized + 'static,

Source§

impl<B, T, N> NodeBuilder<B, T> for DescBuilder<B, T, N>
where B: Backend, T: ?Sized, N: NodeDesc<B, T>,