rendy_graph

Struct GraphBuilder

Source
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>
where B: Backend, T: ?Sized,

Source

pub fn new() -> Self

Create new GraphBuilder

Source

pub fn create_buffer(&mut self, size: u64) -> BufferId

Create new buffer owned by graph.

Source

pub fn create_image( &mut self, kind: Kind, levels: Level, format: Format, clear: Option<ClearValue>, ) -> ImageId

Create new image owned by graph.

Source

pub fn add_node<N: NodeBuilder<B, T> + 'static>(&mut self, builder: N) -> NodeId

Add node to the graph.

Source

pub fn add_dyn_node( &mut self, builder: Box<dyn NodeBuilder<B, T> + 'static>, ) -> NodeId

Add boxed node to the graph.

Source

pub fn with_frames_in_flight(self, frames_in_flight: u32) -> Self

Choose number of frames in flight for the graph

Source

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>
where B: Backend, T: ?Sized,

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B, T> Default for GraphBuilder<B, T>
where B: Backend, T: ?Sized,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.