rendy_graph

Struct DescBuilder

Source
pub struct DescBuilder<B: Backend, T: ?Sized, N> { /* private fields */ }
Expand description

Builder for the node.

Implementations§

Source§

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

Source

pub fn new(desc: N) -> Self

Create new builder out of desc

Source

pub fn add_buffer(&mut self, buffer: BufferId) -> &mut Self

Add buffer to the node. This method must be called for each buffer node uses.

Source

pub fn with_buffer(self, buffer: BufferId) -> Self

Add buffer to the node. This method must be called for each buffer node uses.

Source

pub fn add_image(&mut self, image: ImageId) -> &mut Self

Add image to the node. This method must be called for each image node uses.

Source

pub fn with_image(self, image: ImageId) -> Self

Add image to the node. This method must be called for each image node uses.

Source

pub fn add_dependency(&mut self, dependency: NodeId) -> &mut Self

Add dependency. Node will be placed after its dependencies.

Source

pub fn with_dependency(self, dependency: NodeId) -> Self

Add dependency. Node will be placed after its dependencies.

Trait Implementations§

Source§

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

Source§

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

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

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

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

impl<B, T, D> RenderGroupBuilder<B, T> for DescBuilder<B, T, D>
where B: Backend, T: ?Sized, D: RenderGroupDesc<B, T>,

Source§

fn colors(&self) -> usize

Number of color output images.
Source§

fn depth(&self) -> bool

Is depth image used.
Source§

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

Get buffers used by the group
Source§

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

Get images used by the group
Source§

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

Get nodes this group depends on.
Source§

fn build<'a>( self: Box<Self>, ctx: &GraphContext<B>, factory: &mut Factory<B>, queue: QueueId, aux: &T, framebuffer_width: u32, framebuffer_height: u32, subpass: Subpass<'_, B>, buffers: Vec<NodeBuffer>, images: Vec<NodeImage>, ) -> Result<Box<dyn RenderGroup<B, T>>, CreationError>

Build render group instance.
Source§

fn into_subpass(self) -> SubpassBuilder<B, T>
where Self: Sized + 'static,

Make subpass from render group.

Auto Trait Implementations§

§

impl<B, T, N> Freeze for DescBuilder<B, T, N>
where N: Freeze, T: ?Sized,

§

impl<B, T, N> RefUnwindSafe for DescBuilder<B, T, N>
where N: RefUnwindSafe, T: ?Sized,

§

impl<B, T, N> Send for DescBuilder<B, T, N>
where N: Send, T: ?Sized,

§

impl<B, T, N> Sync for DescBuilder<B, T, N>
where N: Sync, T: ?Sized,

§

impl<B, T, N> Unpin for DescBuilder<B, T, N>
where N: Unpin, T: ?Sized,

§

impl<B, T, N> UnwindSafe for DescBuilder<B, T, N>
where N: UnwindSafe, T: ?Sized,

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.