Struct bevy_render::view::ViewTarget
source · pub struct ViewTarget { /* private fields */ }
Implementations
sourceimpl ViewTarget
impl ViewTarget
pub const TEXTURE_FORMAT_HDR: TextureFormat = TextureFormat::Rgba16Float
sourcepub fn get_color_attachment(
&self,
ops: Operations<Color>
) -> RenderPassColorAttachment<'_>
pub fn get_color_attachment(
&self,
ops: Operations<Color>
) -> RenderPassColorAttachment<'_>
Retrieve this target’s color attachment. This will use Self::sampled_main_texture
and resolve to Self::main_texture
if
the target has sampling enabled. Otherwise it will use Self::main_texture
directly.
sourcepub fn get_unsampled_color_attachment(
&self,
ops: Operations<Color>
) -> RenderPassColorAttachment<'_>
pub fn get_unsampled_color_attachment(
&self,
ops: Operations<Color>
) -> RenderPassColorAttachment<'_>
Retrieve an “unsampled” color attachment using Self::main_texture
.
sourcepub fn main_texture(&self) -> &TextureView
pub fn main_texture(&self) -> &TextureView
The “main” unsampled texture.
sourcepub fn sampled_main_texture(&self) -> Option<&TextureView>
pub fn sampled_main_texture(&self) -> Option<&TextureView>
The “main” sampled texture.
pub fn main_texture_format(&self) -> TextureFormat
sourcepub fn is_hdr(&self) -> bool
pub fn is_hdr(&self) -> bool
Returns true
if and only if the main texture is Self::TEXTURE_FORMAT_HDR
sourcepub fn out_texture(&self) -> &TextureView
pub fn out_texture(&self) -> &TextureView
The final texture this view will render to.
sourcepub fn out_texture_format(&self) -> TextureFormat
pub fn out_texture_format(&self) -> TextureFormat
The format of the final texture this view will render to
sourcepub fn post_process_write(&self) -> PostProcessWrite<'_>
pub fn post_process_write(&self) -> PostProcessWrite<'_>
This will start a new “post process write”, which assumes that the caller
will write the PostProcessWrite
’s source
to the destination
.
source
is the “current” main texture. This will internally flip this
ViewTarget
’s main texture to the destination
texture, so the caller
must ensure source
is copied to destination
, with or without modifications.
Failing to do so will cause the current main texture information to be lost.
Trait Implementations
sourceimpl Component for ViewTargetwhere
Self: Send + Sync + 'static,
impl Component for ViewTargetwhere
Self: Send + Sync + 'static,
type Storage = TableStorage
Auto Trait Implementations
impl !RefUnwindSafe for ViewTarget
impl Send for ViewTarget
impl Sync for ViewTarget
impl Unpin for ViewTarget
impl !UnwindSafe for ViewTarget
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids(
components: &mut Components,
storages: &mut Storages,
ids: &mut impl FnMut(ComponentId)
)
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> Cwhere
F: for<'a> FnMut(&'a mut T) -> OwningPtr<'a>,
fn get_components(self, func: &mut impl FnMut(OwningPtr<'_>))
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more