diff options
| author | Micha White <botahamec@outlook.com> | 2023-02-13 00:24:07 -0500 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2023-02-13 00:24:07 -0500 |
| commit | 861b467b95be55db3a42182b77dba944869bf49f (patch) | |
| tree | f58057d5ab9ad53601332981a31553b0ad05fe1b /render/examples/black.rs | |
| parent | c31d51487082c6cf243ecd10da71a15a78d41add (diff) | |
Rename the subdirectories
Diffstat (limited to 'render/examples/black.rs')
| -rw-r--r-- | render/examples/black.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/render/examples/black.rs b/render/examples/black.rs new file mode 100644 index 0000000..655cbde --- /dev/null +++ b/render/examples/black.rs @@ -0,0 +1,31 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +use std::sync::Arc; + +use alligator_render::{RenderWindowConfig, Renderer}; +use alligator_resources::texture::{TextureManager, TextureManagerConfig}; + +fn update(_renderer: &mut Renderer) {} + +fn main() { + let start = std::time::Instant::now(); + + // configure the render window + let render_config = RenderWindowConfig { + //vsync: false, + //mode: alligator_render::config::WindowMode::BorderlessFullscreen, + title: "Black Screen.exe", + ..Default::default() + }; + + let texture_config = TextureManagerConfig { + initial_capacity: 0, + max_size: 0, + }; + + let texture_manager = Arc::new(TextureManager::new(&texture_config)); + let renderer = Renderer::new(&render_config, texture_manager).unwrap(); + println!("Startup time: {:?}", start.elapsed()); + + renderer.run(update); +} |
