From cd7d74507fa54d026547b7dda9e1498a81a395b5 Mon Sep 17 00:00:00 2001 From: Micha White Date: Sun, 18 Sep 2022 18:16:19 -0400 Subject: An actual instancing API --- examples/square.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/square.rs (limited to 'examples') diff --git a/examples/square.rs b/examples/square.rs new file mode 100644 index 0000000..f9b9223 --- /dev/null +++ b/examples/square.rs @@ -0,0 +1,19 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +use alligator_render::{Instance, RenderWindowConfig, Renderer}; +use winit::event_loop::EventLoop; + +fn main() { + // configure the render window + let config = RenderWindowConfig { + title: "Pokemon: Black and White (New Edition)".into(), + instance_capacity: 1, + ..Default::default() + }; + + let event_loop = EventLoop::new(); + let mut renderer = Renderer::new(&config, &event_loop).unwrap(); + renderer.push_instance(Instance::default()); + + renderer.run(event_loop); +} -- cgit v1.2.3