Updated tutorial to work with tobj 3.0.x

pull/185/head
Hugo Woodiwiss 3 years ago
parent 72ea816735
commit 67c9246b2f
No known key found for this signature in database
GPG Key ID: DA90F48139594E88

@ -200,7 +200,14 @@ impl Model {
layout: &wgpu::BindGroupLayout,
path: P,
) -> Result<Self> {
let (obj_models, obj_materials) = tobj::load_obj(path.as_ref(), true)?;
let (obj_models, obj_materials) = tobj::load_obj(path.as_ref(), &LoadOptions {
triangulate: true,
single_index: true,
..Default::default()
},
)?;
let obj_materials = obj_materials?;
// We're assuming that the texture files are stored with the obj file
let containing_folder = path.as_ref().parent()

Loading…
Cancel
Save