pub fn setup_surface(
label: &str,
size: (u32, u32),
device: &Device,
surface: &Surface<'_>,
adapter: &Adapter,
present_mode: PresentMode,
) -> SurfaceConfigurationExpand description
Configure a surface for presentation once the window size is known.
Call this once at startup and again whenever you handle a resize event.
ยงExample
use wde_wgpu::instance::{setup_surface, PresentMode};
let config = setup_surface(label, size, device, surface, adapter, PresentMode::Fifo);
println!("configured swapchain {}x{}", config.width, config.height);