Merge branch 'master' into cgmath-0.18

pull/157/head
sotrh 3 years ago committed by GitHub
commit d8a861b515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

552
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.18"
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.18"
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.18"
env_logger = "0.7"

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

@ -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.18"
env_logger = "0.7"
@ -38,7 +38,7 @@ features = ["vulkan-portability"]
- See also [gfx-portability](https://github.com/gfx-rs/portability).
## The code
There's not much going on here yet, so I'm just going to post the code in full. Just paste this into you're `main.rs` or equivalent.
There's not much going on here yet, so I'm just going to post the code in full. Just paste this into your `main.rs` or equivalent.
```rust
use winit::{
@ -74,6 +74,6 @@ fn main() {
```
All this does is create a window, and keep it open until until user closes it, or presses escape. Next tutorial we'll actually start using wgpu!
All this does is create a window, and keep it open until user closes it, or presses escape. Next tutorial we'll actually start using wgpu!
<AutoGithubLink/>

@ -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.18"
wgpu = "0.7"

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

@ -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