pub struct GraphBuilder<B: Backend, T: ?Sized> { /* private fields */ }Expand description
Build graph from nodes and resource.
Implementations§
Source§impl<B, T> GraphBuilder<B, T>
impl<B, T> GraphBuilder<B, T>
Sourcepub fn create_buffer(&mut self, size: u64) -> BufferId
pub fn create_buffer(&mut self, size: u64) -> BufferId
Create new buffer owned by graph.
Sourcepub fn create_image(
&mut self,
kind: Kind,
levels: Level,
format: Format,
clear: Option<ClearValue>,
) -> ImageId
pub fn create_image( &mut self, kind: Kind, levels: Level, format: Format, clear: Option<ClearValue>, ) -> ImageId
Create new image owned by graph.
Sourcepub fn add_node<N: NodeBuilder<B, T> + 'static>(&mut self, builder: N) -> NodeId
pub fn add_node<N: NodeBuilder<B, T> + 'static>(&mut self, builder: N) -> NodeId
Add node to the graph.
Sourcepub fn add_dyn_node(
&mut self,
builder: Box<dyn NodeBuilder<B, T> + 'static>,
) -> NodeId
pub fn add_dyn_node( &mut self, builder: Box<dyn NodeBuilder<B, T> + 'static>, ) -> NodeId
Add boxed node to the graph.
Sourcepub fn with_frames_in_flight(self, frames_in_flight: u32) -> Self
pub fn with_frames_in_flight(self, frames_in_flight: u32) -> Self
Choose number of frames in flight for the graph
Sourcepub fn build(
self,
factory: &mut Factory<B>,
families: &mut Families<B>,
aux: &T,
) -> Result<Graph<B, T>, GraphBuildError>
pub fn build( self, factory: &mut Factory<B>, families: &mut Families<B>, aux: &T, ) -> Result<Graph<B, T>, GraphBuildError>
Build Graph.
§Parameters
frames - maximum number of frames Graph will render simultaneously.
families - Iterator of B::QueueFamilys.
device - Device<B> implementation. Device<B> or wrapper.
aux - auxiliary data that Nodes use.
Trait Implementations§
Source§impl<B, T> Debug for GraphBuilder<B, T>
impl<B, T> Debug for GraphBuilder<B, T>
Auto Trait Implementations§
impl<B, T> Freeze for GraphBuilder<B, T>where
T: ?Sized,
impl<B, T> !RefUnwindSafe for GraphBuilder<B, T>
impl<B, T> !Send for GraphBuilder<B, T>
impl<B, T> !Sync for GraphBuilder<B, T>
impl<B, T> Unpin for GraphBuilder<B, T>where
T: ?Sized,
impl<B, T> !UnwindSafe for GraphBuilder<B, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more