Skip to content

Commit

Permalink
Upgrade to tobj 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed May 1, 2023
1 parent dcc4007 commit 9e7900c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 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 crates/fj-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ egui-wgpu = "0.21.0"
fj-interop.workspace = true
fj-math.workspace = true
nalgebra = "0.32.2"
tobj = "3.2.5"
tobj = "4.0.0"
raw-window-handle = "0.5.2"
thiserror = "1.0.40"
tracing = "0.1.37"
Expand Down
5 changes: 4 additions & 1 deletion crates/fj-viewer/src/graphics/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ pub fn load_model(

let mut materials = Vec::new();
for m in obj_materials? {
let texture_data: &[u8] = assets.get_asset(m.diffuse_texture.as_str());
let texture_data: &[u8] = match m.diffuse_texture {
Some(diffuse_texture) => assets.get_asset(diffuse_texture.as_str()),
None => continue,
};

let diffuse_texture = texture::Texture::from_bytes(
device,
Expand Down

0 comments on commit 9e7900c

Please sign in to comment.