pub struct ColorTextureBuilder<'a, C = ()> { /* private fields */ }Expand description
Fluent builder for a graph color texture resource.
Implementations§
Source§impl<'a, C> ColorTextureBuilder<'a, C>
impl<'a, C> ColorTextureBuilder<'a, C>
Sourcepub fn format(self, format: TextureFormat) -> ColorTextureBuilder<'a, C>
pub fn format(self, format: TextureFormat) -> ColorTextureBuilder<'a, C>
Sets the texture format.
Sourcepub fn size(self, width: u32, height: u32) -> ColorTextureBuilder<'a, C>
pub fn size(self, width: u32, height: u32) -> ColorTextureBuilder<'a, C>
Sets the texture dimensions in pixels.
Sourcepub fn usage(self, usage: TextureUsages) -> ColorTextureBuilder<'a, C>
pub fn usage(self, usage: TextureUsages) -> ColorTextureBuilder<'a, C>
Sets the texture usage flags.
Sourcepub fn sample_count(self, count: u32) -> ColorTextureBuilder<'a, C>
pub fn sample_count(self, count: u32) -> ColorTextureBuilder<'a, C>
Sets the MSAA sample count.
Sourcepub fn mip_levels(self, levels: u32) -> ColorTextureBuilder<'a, C>
pub fn mip_levels(self, levels: u32) -> ColorTextureBuilder<'a, C>
Sets the mip level count.
Sourcepub fn clear_color(self, color: Color) -> ColorTextureBuilder<'a, C>
pub fn clear_color(self, color: Color) -> ColorTextureBuilder<'a, C>
Sets the clear color applied on load.
Sourcepub fn no_store(self) -> ColorTextureBuilder<'a, C>
pub fn no_store(self) -> ColorTextureBuilder<'a, C>
Marks the texture’s contents as not requiring store after the pass.
Sourcepub fn force_store(self) -> ColorTextureBuilder<'a, C>
pub fn force_store(self) -> ColorTextureBuilder<'a, C>
Forces the texture’s contents to be stored after the pass.
Sourcepub fn fixed_size(self) -> ColorTextureBuilder<'a, C>
pub fn fixed_size(self) -> ColorTextureBuilder<'a, C>
Keeps the texture at its declared size instead of tracking the render target.
Sourcepub fn external(self) -> ResourceId
pub fn external(self) -> ResourceId
Registers the resource as external, supplied each frame by the caller, and returns its id.
Sourcepub fn transient(self) -> ResourceId
pub fn transient(self) -> ResourceId
Registers the resource as transient, owned by the graph, and returns its id.
Auto Trait Implementations§
impl<'a, C = ()> !RefUnwindSafe for ColorTextureBuilder<'a, C>
impl<'a, C = ()> !UnwindSafe for ColorTextureBuilder<'a, C>
impl<'a, C> Freeze for ColorTextureBuilder<'a, C>where
&'a mut RenderGraph<C>: Freeze,
impl<'a, C> Send for ColorTextureBuilder<'a, C>where
&'a mut RenderGraph<C>: Send,
impl<'a, C> Sync for ColorTextureBuilder<'a, C>where
&'a mut RenderGraph<C>: Sync,
impl<'a, C> Unpin for ColorTextureBuilder<'a, C>where
&'a mut RenderGraph<C>: Unpin,
impl<'a, C> UnsafeUnpin for ColorTextureBuilder<'a, C>where
&'a mut RenderGraph<C>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.