fn render_pass(
	encoder: &mut wgpu::CommandEncoder,
	render_pipeline: &wgpu::RenderPipeline,
	window_uniforms: &UniformsBuffer<WindowUniforms>,
	image: &GpuImage,
	clear: Option<crate::Color>,
	target: &wgpu::TextureView,
) {
	let load = match clear {
		Some(color) => wgpu::LoadOp::Clear(color.into()),
		None => wgpu::LoadOp::Load,
	};

	let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
		label: Some("render-image"),
		color_attachments: &[wgpu::RenderPassColorAttachment {
			view: &target,
			resolve_target: None,
			ops: wgpu::Operations { load, store: true },
		}],
		depth_stencil_attachment: None,
	});

	render_pass.set_pipeline(render_pipeline);
	render_pass.set_bind_group(0, window_uniforms.bind_group(), &[]);
	render_pass.set_bind_group(1, image.bind_group(), &[]);
	render_pass.draw(0..6, 0..1);
	drop(render_pass);
}
/// Perform a render pass of an image.
Perform a render pass of an image.
Perform a render pass of an image .
fn render_pass(
	encoder: &mut wgpu::CommandEncoder,
	render_pipeline: &wgpu::RenderPipeline,
	window_uniforms: &UniformsBuffer<WindowUniforms>,
	image: &GpuImage,
	clear: Option<crate::Color>,
	target: &wgpu::TextureView,
) {
	let load = match clear {
		Some(color) => wgpu::LoadOp::Clear(color.into()),
		None => wgpu::LoadOp::Load,
	};
	let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
		label: Some("render-image"),
		color_attachments: &[wgpu::RenderPassColorAttachment {
			view: &target,
			resolve_target: None,
			ops: wgpu::Operations { load, store: true },
		}],
		depth_stencil_attachment: None,
	});
	render_pass.set_pipeline(render_pipeline);
	render_pass.set_bind_group(0, window_uniforms.bind_group(), &[]);
	render_pass.set_bind_group(1, image.bind_group(), &[]);
	render_pass.draw(0..6, 0..1);
	drop(render_pass);
}
fn render_pass ( encoder : & mut wgpu :: CommandEncoder , render_pipeline : & wgpu :: RenderPipeline , window_uniforms : & UniformsBuffer < WindowUniforms > , image : & GpuImage , clear : Option < crate :: Color > , target : & wgpu :: TextureView , ) { let load = match clear { Some ( color ) => wgpu :: LoadOp :: Clear ( color . into ( ) ) , None => wgpu :: LoadOp :: Load , } ; let mut render_pass = encoder . begin_render_pass ( & wgpu :: RenderPassDescriptor { label : Some ( " " ) , color_attachments : & [ wgpu :: RenderPassColorAttachment { view : & target , resolve_target : None , ops : wgpu :: Operations { load , store : true } , } ] , depth_stencil_attachment : None , } ) ; render_pass . set_pipeline ( render_pipeline ) ; render_pass . set_bind_group ( 0 , window_uniforms . bind_group ( ) , & [ ] ) ; render_pass . set_bind_group ( 1 , image . bind_group ( ) , & [ ] ) ; render_pass . draw ( 0 .. 6 , 0 .. 1 ) ; drop ( render_pass ) ; }
Perform a render pass of an image.
Perform a render pass of an image .
encoder
&mut wgpu::CommandEncoder
render_pipeline
&wgpu::RenderPipeline
window_uniforms
&UniformsBuffer<WindowUniforms>
image
&GpuImage
clear
Option<crate::Color>
target
&wgpu::TextureView