Skip to content

Commit

Permalink
Fix resize crash by storing screen dimensions on resize.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaphula committed Feb 27, 2024
1 parent 74328eb commit df5aa53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/src/multiple_render_targets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ impl crate::framework::Example for Example {
}

fn resize(&mut self, config: &SurfaceConfiguration, device: &Device, _queue: &Queue) {
self.screen_width = config.width;
self.screen_height = config.height;
self.texture_targets =
create_target_textures(device, config.format, config.width, config.height);
self.drawer.rebuild_resources(device, &self.texture_targets);
Expand Down

0 comments on commit df5aa53

Please sign in to comment.