diff options
| author | Micha White <botahamec@outlook.com> | 2023-02-04 13:25:45 -0500 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2023-02-04 13:25:45 -0500 |
| commit | 9fd7d6689d5d90679e4b0c12e463ef4e2f8bf515 (patch) | |
| tree | a0b127f1094b72d0966c2edea3d171e74001c875 /alligator_render/examples/bmp.rs | |
| parent | 518a87ddb2e6ce908affce2773fc7f92beb52c73 (diff) | |
Have the renderer take the texture manager
Diffstat (limited to 'alligator_render/examples/bmp.rs')
| -rw-r--r-- | alligator_render/examples/bmp.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/alligator_render/examples/bmp.rs b/alligator_render/examples/bmp.rs index b8ce00c..0bad037 100644 --- a/alligator_render/examples/bmp.rs +++ b/alligator_render/examples/bmp.rs @@ -3,6 +3,7 @@ use std::num::NonZeroU32; use alligator_render::{ImageFormat, Instance, RenderWindowConfig, Renderer}; +use alligator_resources::texture::{TextureManager, TextureManagerConfig}; #[profiling::function] fn update(renderer: &mut Renderer) { @@ -12,7 +13,7 @@ fn update(renderer: &mut Renderer) { fn main() { // configure the render window - let config = RenderWindowConfig { + let render_config = RenderWindowConfig { title: "Bumper Stickers", instance_capacity: 2, default_width: NonZeroU32::new(1280).unwrap(), @@ -22,7 +23,15 @@ fn main() { ..Default::default() }; - let mut renderer = Renderer::new(&config).unwrap(); + let texture_config = TextureManagerConfig { + initial_capacity: 3, + max_size: 3_000_000, + atlas_height: 150, + atlas_width: 150, + }; + + let texture_manager = TextureManager::new(&texture_config); + let mut renderer = Renderer::new(&render_config, texture_manager).unwrap(); // render the alligator let gator = include_bytes!("res/gator.ff"); |
