pub struct RenderGraphBuilder { /* private fields */ }Expand description
Fluent builder for constructing a RenderGraph.
Implementations§
Source§impl RenderGraphBuilder
impl RenderGraphBuilder
pub fn new(label: &str, width: u32, height: u32) -> Self
pub fn backbuffer_size(&self) -> (u32, u32)
Sourcepub fn texture(&mut self, name: &str, format: TextureFormat) -> ResourceHandle
pub fn texture(&mut self, name: &str, format: TextureFormat) -> ResourceHandle
Declare a full-resolution transient texture.
Sourcepub fn texture_scaled(
&mut self,
name: &str,
format: TextureFormat,
width_scale: f32,
height_scale: f32,
) -> ResourceHandle
pub fn texture_scaled( &mut self, name: &str, format: TextureFormat, width_scale: f32, height_scale: f32, ) -> ResourceHandle
Declare a texture at a specific resolution scale.
Sourcepub fn texture_absolute(
&mut self,
name: &str,
format: TextureFormat,
width: u32,
height: u32,
) -> ResourceHandle
pub fn texture_absolute( &mut self, name: &str, format: TextureFormat, width: u32, height: u32, ) -> ResourceHandle
Declare a texture with explicit pixel dimensions.
Sourcepub fn import(&mut self, name: &str, format: TextureFormat) -> ResourceHandle
pub fn import(&mut self, name: &str, format: TextureFormat) -> ResourceHandle
Import an external resource.
Sourcepub fn graphics_pass(&mut self, name: &str) -> PassBuilder<'_>
pub fn graphics_pass(&mut self, name: &str) -> PassBuilder<'_>
Add a graphics pass.
Sourcepub fn compute_pass(&mut self, name: &str) -> PassBuilder<'_>
pub fn compute_pass(&mut self, name: &str) -> PassBuilder<'_>
Add a compute pass.
Sourcepub fn enable_feature(&mut self, feature: &str) -> &mut Self
pub fn enable_feature(&mut self, feature: &str) -> &mut Self
Enable a feature flag.
Sourcepub fn build(self) -> RenderGraph
pub fn build(self) -> RenderGraph
Finalize and return the built graph.
Auto Trait Implementations§
impl Freeze for RenderGraphBuilder
impl RefUnwindSafe for RenderGraphBuilder
impl Send for RenderGraphBuilder
impl Sync for RenderGraphBuilder
impl Unpin for RenderGraphBuilder
impl UnsafeUnpin for RenderGraphBuilder
impl UnwindSafe for RenderGraphBuilder
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.