Struct nannou_wgpu::TextureReshaper [−][src]
pub struct TextureReshaper { /* fields omitted */ }
Expand description
Reshapes a texture from its original size, sample_count and format to the destination size, sample_count and format.
The src_texture
must have the TextureUsages::SAMPLED
enabled.
The dst_texture
must have the TextureUsages::RENDER_ATTACHMENT
enabled.
Implementations
pub fn new(
device: &Device,
src_texture: &TextureViewHandle,
src_sample_count: u32,
src_sample_type: TextureSampleType,
dst_sample_count: u32,
dst_format: TextureFormat
) -> Self
pub fn new(
device: &Device,
src_texture: &TextureViewHandle,
src_sample_count: u32,
src_sample_type: TextureSampleType,
dst_sample_count: u32,
dst_format: TextureFormat
) -> Self
Construct a new Reshaper
.
pub fn encode_render_pass(
&self,
dst_texture: &TextureViewHandle,
encoder: &mut CommandEncoder
)
pub fn encode_render_pass(
&self,
dst_texture: &TextureViewHandle,
encoder: &mut CommandEncoder
)
Given an encoder, submits a render pass command for writing the source texture to the destination texture.