|
|
@ -268,12 +268,14 @@ impl State {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>) {
|
|
|
|
pub fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>) {
|
|
|
|
|
|
|
|
if new_size.width > 0 && new_size.height > 0 {
|
|
|
|
self.size = new_size;
|
|
|
|
self.size = new_size;
|
|
|
|
self.sc_desc.width = new_size.width;
|
|
|
|
self.sc_desc.width = new_size.width;
|
|
|
|
self.sc_desc.height = new_size.height;
|
|
|
|
self.sc_desc.height = new_size.height;
|
|
|
|
self.swap_chain = self.device.create_swap_chain(&self.surface, &self.sc_desc);
|
|
|
|
self.swap_chain = self.device.create_swap_chain(&self.surface, &self.sc_desc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn input(&mut self, event: &WindowEvent) -> bool {
|
|
|
|
fn input(&mut self, event: &WindowEvent) -> bool {
|
|
|
|
match event {
|
|
|
|
match event {
|
|
|
|