Skip to content

Commit

Permalink
Fix updating instances (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
asny committed May 22, 2022
1 parent 9e3524f commit 43f2106
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/renderer/geometry/instanced_mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl InstancedMesh {
#[cfg(debug_assertions)]
instances.validate()?;
self.instance_count = instances.count();
self.instance_buffers.clear();
self.instance_transforms = (0..self.instance_count as usize)
.map(|i| {
Mat4::from_translation(instances.translations[i])
Expand Down

0 comments on commit 43f2106

Please sign in to comment.