summaryrefslogtreecommitdiff
path: root/alligator_render/examples/black.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2023-02-04 13:25:45 -0500
committerMicha White <botahamec@outlook.com>2023-02-04 13:25:45 -0500
commit9fd7d6689d5d90679e4b0c12e463ef4e2f8bf515 (patch)
treea0b127f1094b72d0966c2edea3d171e74001c875 /alligator_render/examples/black.rs
parent518a87ddb2e6ce908affce2773fc7f92beb52c73 (diff)
Have the renderer take the texture manager
Diffstat (limited to 'alligator_render/examples/black.rs')
-rw-r--r--alligator_render/examples/black.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/alligator_render/examples/black.rs b/alligator_render/examples/black.rs
index 106e0f0..198eef2 100644
--- a/alligator_render/examples/black.rs
+++ b/alligator_render/examples/black.rs
@@ -1,6 +1,7 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use alligator_render::{RenderWindowConfig, Renderer};
+use alligator_resources::texture::{TextureManager, TextureManagerConfig};
fn update(_renderer: &mut Renderer) {}
@@ -8,14 +9,22 @@ fn main() {
let start = std::time::Instant::now();
// configure the render window
- let config = RenderWindowConfig {
+ let render_config = RenderWindowConfig {
//vsync: false,
//mode: alligator_render::config::WindowMode::BorderlessFullscreen,
title: "Black Screen.exe",
..Default::default()
};
- let renderer = Renderer::new(&config).unwrap();
+ let texture_config = TextureManagerConfig {
+ initial_capacity: 0,
+ max_size: 0,
+ atlas_width: 1,
+ atlas_height: 1,
+ };
+
+ let texture_manager = TextureManager::new(&texture_config);
+ let renderer = Renderer::new(&render_config, texture_manager).unwrap();
println!("Startup time: {:?}", start.elapsed());
renderer.run(update);