fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>) {
        if new_size.width > 0 && new_size.height > 0 {
            self.size = new_size;
            self.config.width = new_size.width;
            self.config.height = new_size.height;
            self.surface.configure(&self.device, &self.config);
        }
    }
/// Update the size of the window so rendering is aware of the change
Update the size of the window so rendering is aware of the change
Update the size of the window so rendering is aware of the change
fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>) {
        if new_size.width > 0 && new_size.height > 0 {
            self.size = new_size;
            self.config.width = new_size.width;
            self.config.height = new_size.height;
            self.surface.configure(&self.device, &self.config);
        }
    }
fn resize ( & mut self , new_size : winit :: dpi :: PhysicalSize < u32 > ) { if new_size . width > 0 && new_size . height > 0 { self . size = new_size ; self . config . width = new_size . width ; self . config . height = new_size . height ; self . surface . configure ( & self . device , & self . config ) ; } }
Update the size of the window so rendering is aware of the change
Update the size of the window so rendering is aware of the change
&mut self
new_size
winit::dpi::PhysicalSize<u32>
&mut self
new_size
winit::dpi::PhysicalSize<u32>