diff options
| author | Micha White <botahamec@outlook.com> | 2022-10-20 23:19:00 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2022-10-20 23:19:00 -0400 |
| commit | 11077150cbc909e414cf5b27f18d02629e6b01da (patch) | |
| tree | bb1bfd66457e4d901be5225abf0aeeef8c06316d /alligator_render/examples/bunnymark.rs | |
| parent | 09df670b8e45a3ffe2853773e648b80b6b6d6254 (diff) | |
Made the run function generic
Diffstat (limited to 'alligator_render/examples/bunnymark.rs')
| -rw-r--r-- | alligator_render/examples/bunnymark.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alligator_render/examples/bunnymark.rs b/alligator_render/examples/bunnymark.rs index 759d725..a343ce5 100644 --- a/alligator_render/examples/bunnymark.rs +++ b/alligator_render/examples/bunnymark.rs @@ -121,6 +121,7 @@ fn main() { .textures_mut() .load_from_memory(bunny, ImageFormat::Farbfeld) .unwrap(); + let state = Box::leak(Box::new(State::new(texture_id))); - renderer.run(Box::leak(Box::new(|r| state.update(r)))); + renderer.run(|r| state.update(r)); } |
