Skip to content

Commit

Permalink
Merge pull request #1139 from thenlevy/fix_wgpu_integration
Browse files Browse the repository at this point in the history
Fix wgpu integration example
  • Loading branch information
hecrj authored Sep 26, 2022
2 parents 3c2a8b7 + 0412718 commit 4aea743
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/integration_wgpu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,7 @@ pub fn main() {
WindowEvent::ModifiersChanged(new_modifiers) => {
modifiers = new_modifiers;
}
WindowEvent::Resized(new_size) => {
viewport = Viewport::with_physical_size(
Size::new(new_size.width, new_size.height),
window.scale_factor(),
);

WindowEvent::Resized(_) => {
resized = true;
}
WindowEvent::CloseRequested => {
Expand Down Expand Up @@ -205,6 +200,11 @@ pub fn main() {
if resized {
let size = window.inner_size();

viewport = Viewport::with_physical_size(
Size::new(size.width, size.height),
window.scale_factor(),
);

surface.configure(
&device,
&wgpu::SurfaceConfiguration {
Expand Down

0 comments on commit 4aea743

Please sign in to comment.