diff options
| author | Micha White <botahamec@outlook.com> | 2022-10-20 23:00:17 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2022-10-20 23:00:17 -0400 |
| commit | 09df670b8e45a3ffe2853773e648b80b6b6d6254 (patch) | |
| tree | 90c8dd436b6162ae86d4505d8cf45ba479c3516b /alligator_render/src | |
| parent | eb3ced51f90260e3057bb782373cd8ce887d3562 (diff) | |
Added a bunnymark
Diffstat (limited to 'alligator_render/src')
| -rw-r--r-- | alligator_render/src/lib.rs | 4 | ||||
| -rw-r--r-- | alligator_render/src/renderer.rs | 2 | ||||
| -rw-r--r-- | alligator_render/src/texture.rs | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/alligator_render/src/lib.rs b/alligator_render/src/lib.rs index f5403f2..debb68c 100644 --- a/alligator_render/src/lib.rs +++ b/alligator_render/src/lib.rs @@ -13,10 +13,12 @@ mod texture; mod vertex; pub(crate) use camera::Camera; -pub use config::RenderWindowConfig; +pub use config::*; pub use instance::Instance; pub(crate) use instance::InstanceBuffer; +pub use instance::InstanceId; pub use renderer::Renderer; pub use texture::ImageFormat; pub(crate) use texture::TextureAtlas; +pub use texture::TextureId; pub(crate) use vertex::Vertex; diff --git a/alligator_render/src/renderer.rs b/alligator_render/src/renderer.rs index afcb92b..ec3cac5 100644 --- a/alligator_render/src/renderer.rs +++ b/alligator_render/src/renderer.rs @@ -372,7 +372,7 @@ impl Renderer { } /// Run the renderer indefinitely - pub fn run(mut self, f: &'static dyn Fn(&mut Self)) -> ! { + pub fn run(mut self, f: &'static mut dyn FnMut(&mut Self)) -> ! { self.window.set_visible(true); let event_loop = self.event_loop(); event_loop.run(move |event, _, control_flow| match event { diff --git a/alligator_render/src/texture.rs b/alligator_render/src/texture.rs index e343508..0eacb5b 100644 --- a/alligator_render/src/texture.rs +++ b/alligator_render/src/texture.rs @@ -19,6 +19,7 @@ pub struct TextureId(usize); impl TextureId { #[allow(clippy::new_without_default)] + #[must_use] pub fn new() -> Self { Self(NEXT_TEXTURE_ID.fetch_add(1, Ordering::Relaxed)) } |
