Merge pull request #1139 from thenlevy/fix_wgpu_integration
Fix wgpu integration example
This commit is contained in:
commit
4aea743999
1 changed files with 6 additions and 6 deletions
|
|
@ -157,12 +157,7 @@ pub fn main() {
|
||||||
WindowEvent::ModifiersChanged(new_modifiers) => {
|
WindowEvent::ModifiersChanged(new_modifiers) => {
|
||||||
modifiers = new_modifiers;
|
modifiers = new_modifiers;
|
||||||
}
|
}
|
||||||
WindowEvent::Resized(new_size) => {
|
WindowEvent::Resized(_) => {
|
||||||
viewport = Viewport::with_physical_size(
|
|
||||||
Size::new(new_size.width, new_size.height),
|
|
||||||
window.scale_factor(),
|
|
||||||
);
|
|
||||||
|
|
||||||
resized = true;
|
resized = true;
|
||||||
}
|
}
|
||||||
WindowEvent::CloseRequested => {
|
WindowEvent::CloseRequested => {
|
||||||
|
|
@ -205,6 +200,11 @@ pub fn main() {
|
||||||
if resized {
|
if resized {
|
||||||
let size = window.inner_size();
|
let size = window.inner_size();
|
||||||
|
|
||||||
|
viewport = Viewport::with_physical_size(
|
||||||
|
Size::new(size.width, size.height),
|
||||||
|
window.scale_factor(),
|
||||||
|
);
|
||||||
|
|
||||||
surface.configure(
|
surface.configure(
|
||||||
&device,
|
&device,
|
||||||
&wgpu::SurfaceConfiguration {
|
&wgpu::SurfaceConfiguration {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue