Update winit to 0.24

pull/164/head
Hiroaki Yutani 3 years ago
parent 044871db65
commit 24f565ee58

543
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -13,7 +13,7 @@ path = "src/main.rs"
[dependencies]
image = "0.23"
winit = "0.22"
winit = "0.24"
shaderc = "0.7"
cgmath = "0.17"
env_logger = "0.7"

@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
image = "0.23"
winit = "0.22"
winit = "0.24"
shaderc = "0.7"
cgmath = "0.17"
env_logger = "0.7"

@ -6,7 +6,7 @@ edition = "2018"
[dependencies]
image = "0.23"
winit = "0.22"
winit = "0.24"
# shaderc = "0.7" # REMOVED!
cgmath = "0.17"
env_logger = "0.7"

@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
image = "0.23"
winit = "0.22"
winit = "0.24"
cgmath = "0.17"
wgpu = "0.7"
env_logger = "0.7"

@ -15,7 +15,7 @@ log = "0.4"
futures = "0.3"
image = "0.23"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -13,7 +13,7 @@ log = "0.4"
futures = "0.3"
image = "0.23"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -13,7 +13,7 @@ log = "0.4"
futures = "0.3"
image = "0.23"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -13,7 +13,7 @@ futures = "0.3"
image = "0.23"
log = "0.4"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -14,7 +14,7 @@ image = "0.23"
log = "0.4"
tobj = "2.0"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -14,7 +14,7 @@ image = "0.23"
log = "0.4"
tobj = "2.0"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -14,7 +14,7 @@ image = "0.23"
log = "0.4"
tobj = "2.0"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -14,7 +14,7 @@ image = "0.23"
log = "0.4"
tobj = "2.0"
wgpu = "0.7"
winit = "0.23"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -15,7 +15,7 @@ log = "0.4"
rayon = "1.4" # NEW!
tobj = "2.0"
wgpu = "0.7"
winit = "0.23"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -15,7 +15,7 @@ log = "0.4"
rayon = "1.4"
tobj = "2.0"
wgpu = { version = "0.7", features = ["trace"] }
winit = "0.22"
winit = "0.24"
[build-dependencies]
anyhow = "1.0"

@ -1,7 +1,7 @@
use cgmath::*;
use std::f32::consts::FRAC_PI_2;
use std::time::Duration;
use winit::dpi::LogicalPosition;
use winit::dpi::PhysicalPosition;
use winit::event::*;
#[rustfmt::skip]
@ -143,7 +143,7 @@ impl CameraController {
self.scroll = -match delta {
// I'm assuming a line is about 100 pixels
MouseScrollDelta::LineDelta(_, scroll) => scroll * 100.0,
MouseScrollDelta::PixelDelta(LogicalPosition { y: scroll, .. }) => *scroll as f32,
MouseScrollDelta::PixelDelta(PhysicalPosition { y: scroll, .. }) => *scroll as f32,
};
}

@ -15,7 +15,7 @@ image = "0.23"
log = "0.4"
tobj = "2.0"
wgpu = "0.7"
winit = "0.22"
winit = "0.24"
gif = "0.10.3"
framework = { version = "0.1.0", path = "../framework" }

@ -9,7 +9,7 @@ For the beginner stuff, we're going to keep things very simple, we'll add things
```toml
[dependencies]
image = "0.23"
winit = "0.22"
winit = "0.24"
shaderc = "0.7"
cgmath = "0.17"
env_logger = "0.7"

@ -276,7 +276,7 @@ We'll start writing code in it in a bit. First we need to add some things to our
```toml
[dependencies]
image = "0.23"
winit = "0.22"
winit = "0.24"
# shaderc = "0.7" # REMOVED!
cgmath = "0.17"
wgpu = "0.7"

@ -424,7 +424,7 @@ For convenience sake, let's pull our texture code into its module. We'll first n
```toml
[dependencies]
image = "0.23"
winit = "0.22"
winit = "0.24"
cgmath = "0.17"
env_logger = "0.7"
log = "0.4"

@ -315,7 +315,7 @@ fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>) {
}
```
`input()` will need to be updated as well. Up to this point we have been using `WindowEvent`s for our camera controls. While this works, it's not the best solution. The [winit docs](https://docs.rs/winit/0.23.0/winit/event/enum.WindowEvent.html?search=#variant.CursorMoved) inform us that OS will often transform the data for the `CursorMoved` event to allow effects such as cursor acceleration. Because of this, we're going to change our `input()` function to use `DeviceEvent` instead of `WindowEvent`.
`input()` will need to be updated as well. Up to this point we have been using `WindowEvent`s for our camera controls. While this works, it's not the best solution. The [winit docs](https://docs.rs/winit/0.24.0/winit/event/enum.WindowEvent.html?search=#variant.CursorMoved) inform us that OS will often transform the data for the `CursorMoved` event to allow effects such as cursor acceleration. Because of this, we're going to change our `input()` function to use `DeviceEvent` instead of `WindowEvent`.
```rust
// UPDATED!

Loading…
Cancel
Save