pub struct RenderGraph { /* private fields */ }Expand description
Builder for a frame’s render graph.
Implementations§
Source§impl RenderGraph
impl RenderGraph
pub fn new() -> Self
Sourcepub fn declare_resource(&mut self, desc: ResourceDesc) -> ResourceHandle
pub fn declare_resource(&mut self, desc: ResourceDesc) -> ResourceHandle
Declare a transient resource (created and destroyed within this frame).
Sourcepub fn set_output(&mut self, resource: impl Into<String>)
pub fn set_output(&mut self, resource: impl Into<String>)
Declare the final output resource.
Sourcepub fn add_pass(&mut self, pass: RenderPass)
pub fn add_pass(&mut self, pass: RenderPass)
Add a pre-built pass.
Sourcepub fn graphics_pass<'g>(
&'g mut self,
name: impl Into<String>,
) -> PassBuilder<'g>
pub fn graphics_pass<'g>( &'g mut self, name: impl Into<String>, ) -> PassBuilder<'g>
Start building a graphics pass.
Sourcepub fn compute_pass<'g>(
&'g mut self,
name: impl Into<String>,
) -> PassBuilder<'g>
pub fn compute_pass<'g>( &'g mut self, name: impl Into<String>, ) -> PassBuilder<'g>
Start building a compute pass.
Sourcepub fn transfer_pass<'g>(
&'g mut self,
name: impl Into<String>,
) -> PassBuilder<'g>
pub fn transfer_pass<'g>( &'g mut self, name: impl Into<String>, ) -> PassBuilder<'g>
Start building a transfer pass.
Sourcepub fn compile(self) -> Result<CompiledGraph, GraphError>
pub fn compile(self) -> Result<CompiledGraph, GraphError>
Compile the graph: topological sort + barrier insertion.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RenderGraph
impl RefUnwindSafe for RenderGraph
impl Send for RenderGraph
impl Sync for RenderGraph
impl Unpin for RenderGraph
impl UnsafeUnpin for RenderGraph
impl UnwindSafe for RenderGraph
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.