Only load one tree
@@ -17,8 +17,12 @@ fn main() {
degrees(45.0), width as f32 / height as f32, 0.1, 1000.0);
camera.enable_matrix_buffer(&gl);
- let objects: Vec<_> = Mesh::new_from_obj_source(&gl, include_str!("../assets/models/tree1.obj").to_string()).unwrap().into_iter()
- .filter(|object| object.name() != "Plane").collect();
+ let loaded_objects: Vec<_> = Mesh::new_from_obj_source(&gl, include_str!("../assets/models/tree1.obj").to_string()).unwrap();
+ for object in loaded_objects.iter() {
+ println!("{}", object.name());
+ }
+ let objects: Vec<_> = loaded_objects.into_iter().filter(|object| object.name().starts_with("tree.001")).collect();
+
let plane = Mesh::new_plane(&gl).unwrap();
let mut mesh_shader = MeshShader::new(&gl).unwrap();
mesh_shader.diffuse_intensity = 0.5;
