fn create_swap_chain(
	size: winit::dpi::PhysicalSize<u32>,
	surface: &wgpu::Surface,
	format: wgpu::TextureFormat,
	device: &wgpu::Device,
) -> wgpu::SwapChain {
	let swap_chain_desc = wgpu::SwapChainDescriptor {
		usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
		format,
		width: size.width,
		height: size.height,
		present_mode: wgpu::PresentMode::Mailbox,
	};

	device.create_swap_chain(&surface, &swap_chain_desc)
}
/// Create a swap chain for a surface.
Create a swap chain for a surface.
Create a swap chain for a surface .
fn create_swap_chain(
	size: winit::dpi::PhysicalSize<u32>,
	surface: &wgpu::Surface,
	format: wgpu::TextureFormat,
	device: &wgpu::Device,
) -> wgpu::SwapChain {
	let swap_chain_desc = wgpu::SwapChainDescriptor {
		usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
		format,
		width: size.width,
		height: size.height,
		present_mode: wgpu::PresentMode::Mailbox,
	};
	device.create_swap_chain(&surface, &swap_chain_desc)
}
fn create_swap_chain ( size : winit :: dpi :: PhysicalSize < u32 > , surface : & wgpu :: Surface , format : wgpu :: TextureFormat , device : & wgpu :: Device , ) -> wgpu :: SwapChain { let swap_chain_desc = wgpu :: SwapChainDescriptor { usage : wgpu :: TextureUsage :: RENDER_ATTACHMENT , format , width : size . width , height : size . height , present_mode : wgpu :: PresentMode :: Mailbox , } ; device . create_swap_chain ( & surface , & swap_chain_desc ) }
Create a swap chain for a surface.
Create a swap chain for a surface .
size
winit::dpi::PhysicalSize<u32>
surface
&wgpu::Surface
format
wgpu::TextureFormat
device
&wgpu::Device