Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from sotrh:master #4

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ target/
/image.png
/output*.*
output/
debug-target.json

/trace
*trace.zip
Expand Down
18 changes: 2 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion code/beginner/tutorial9-models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = "22.0"
winit = { version = "0.29", features = ["rwh_05"] }

Expand Down
2 changes: 1 addition & 1 deletion code/intermediate/tutorial10-lighting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = { version = "22.0"}
winit = { version = "0.29", features = ["rwh_05"] }

Expand Down
2 changes: 1 addition & 1 deletion code/intermediate/tutorial11-normals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = { version = "22.0"}
winit = { version = "0.29", features = ["rwh_05"] }

Expand Down
2 changes: 1 addition & 1 deletion code/intermediate/tutorial12-camera/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = { version = "22.0"}
winit = { version = "0.29", features = ["rwh_05"] }
instant = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion code/intermediate/tutorial13-hdr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = { version = "22.0"}
winit = { version = "0.29", features = ["rwh_05"] }
instant = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion code/intermediate/wip-terrain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cgmath = { version = "0.18", features = [ "swizzle" ] }
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = { version = "22.0"}
winit = { version = "0.29", features = ["rwh_05"] }
instant = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion code/showcase/gifs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env_logger = "0.10"
pollster = "0.3"
image = "0.24.2"
log = "0.4"
tobj = "3.1"
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = "22.0"
winit = { version = "0.29", features = ["rwh_05"] }
gif = "0.11.4"
Expand Down
2 changes: 1 addition & 1 deletion code/showcase/mouse-picking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cgmath = "0.18"
env_logger = "0.10"
pollster = "0.3"
log = "0.4"
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = { version = "22.0"}
winit = { version = "0.29", features = ["rwh_05"] }
instant = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion code/showcase/threading/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env_logger = "0.10"
pollster = "0.3"
log = "0.4"
rayon = "1.4" # NEW!
tobj = { version = "3.2", features = ["async"]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
wgpu = { version = "22.0"}
winit = { version = "0.29", features = ["rwh_05"] }
instant = "0.1"
Expand Down
1 change: 1 addition & 0 deletions docs/beginner/tutorial4-buffer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ render_pass.draw_indexed(0..self.num_indices, 0, 0..1); // 2.
```

A couple of things to note:

1. The method name is `set_index_buffer`, not `set_index_buffers`. You can only have one index buffer set at a time.
2. When using an index buffer, you need to use `draw_indexed`. The `draw` method ignores the index buffer. Also, make sure you use the number of indices (`num_indices`), not vertices, as your model will either draw wrong or the method will `panic` because there are not enough indices.

Expand Down
4 changes: 1 addition & 3 deletions docs/beginner/tutorial9-models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,7 @@ We're going to use the [tobj](https://docs.rs/tobj/3.0/tobj/) library to load ou
```toml
[dependencies]
# other dependencies...
tobj = { version = "3.2.1", features = [
"async",
]}
tobj = { version = "3.2", default-features = false, features = ["async"]}
```

Before we can load our model, though, we need somewhere to put it.
Expand Down