Skip to content

Commit

Permalink
correctly reset particle system in example upon recreation, fixes met…
Browse files Browse the repository at this point in the history
…al not rendering after reset as well
  • Loading branch information
EriKWDev committed Dec 15, 2024
1 parent 450bb7d commit 2a9497c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/particle/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ impl Example {
self.sample_count,
);
self.particle_system.params = old_params;
self.command_encoder.start();
self.particle_system.reset(&mut self.command_encoder);
let sp = self.context.submit(&mut self.command_encoder);
self.context.wait_for(&sp, !0);

if let Some(msaa_view) = self.msaa_view.take() {
self.context.destroy_texture_view(msaa_view);
Expand Down

0 comments on commit 2a9497c

Please sign in to comment.