Update lib.rs

This commit is contained in:
2024-03-15 11:27:42 -03:00
parent 393dce8a73
commit dbe8a2ad33

View File

@ -498,10 +498,11 @@ impl State {
render_pass.set_vertex_buffer(1, self.instance_buffer.slice(..)); render_pass.set_vertex_buffer(1, self.instance_buffer.slice(..));
render_pass.set_pipeline(&self.render_pipeline); render_pass.set_pipeline(&self.render_pipeline);
render_pass.set_bind_group(0, &self.diffuse_bind_group, &[]); render_pass.draw_model_instanced(
render_pass.set_bind_group(1, &self.camera_bind_group, &[]); &self.obj_model,
render_pass 0..self.instances.len() as u32,
.draw_mesh_instanced(&self.obj_model.meshes[0], 0..self.instances.len() as u32); &self.camera_bind_group,
);
} }
// submit will accept anything that implements IntoIter // submit will accept anything that implements IntoIter