Trait nannou::wgpu::ToTextureView
source · pub trait ToTextureView {
// Required method
fn to_texture_view(&self) -> TextureView;
}
Expand description
Types that can produce a texture view.
The primary purpose of this trait is to allow for APIs to be generic over both Texture
and
TextureView
. This is particularly useful for the draw
API as we can avoid needing users to
understand the difference between the two. That said, it is slightly more efficient to create
your texture view once and re-use it, rather than have these APIs create a new one from your
texture each time they are invoked.