pub struct ClearViews { /* private fields */ }Expand description
Views for clearing a 2D texture with render passes. The contained views must be manually
destroyed by calling Self::destroy.
This helper encapsulates the indexing logic for clear views (in Self::views),
to reduce the chance of doing so incorrectly and failing to properly clear a texture.
Color and depth/stencil textures have a single clear view with wgt::TextureAspect::All.
This is true even for combined depth/stencil formats, which clear both aspects
simultaneously using a single view. The number of views is (mip level count) * (array
layer count).
Multi-planar textures have a clear view per plane. The number of views is (mip level count) * (array layer count) * (plane count).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ClearViews
impl !UnwindSafe for ClearViews
impl Forget for ClearViews
impl Freeze for ClearViewswhere
*const dyn DynTextureView is !null: Freeze,
PhantomData<dyn DynTextureView>: Freeze,
*const Box<dyn DynTextureView> is !null: Freeze,
PhantomData<Box<dyn DynTextureView>>: Freeze,
&'static [TextureAspect]: Freeze,
impl Move for ClearViews
impl Send for ClearViews
impl Sync for ClearViews
impl Unpin for ClearViewswhere
Box<dyn DynTextureView>: Unpin,
*const Box<dyn DynTextureView> is !null: Unpin,
&'static [TextureAspect]: Unpin,
impl UnsafeUnpin for ClearViewswhere
*const dyn DynTextureView is !null: UnsafeUnpin,
PhantomData<dyn DynTextureView>: UnsafeUnpin,
*const Box<dyn DynTextureView> is !null: UnsafeUnpin,
PhantomData<Box<dyn DynTextureView>>: UnsafeUnpin,
&'static [TextureAspect]: 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