summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-09-18 18:16:19 -0400
committerMicha White <botahamec@outlook.com>2022-09-18 18:16:19 -0400
commitcd7d74507fa54d026547b7dda9e1498a81a395b5 (patch)
tree7d5435eec9c84dead9cdc36a4ba87dcfe520f5c3 /examples
parent83295e01008bdf25e03f6b5aa18b93b735a5e326 (diff)
An actual instancing API
Diffstat (limited to 'examples')
-rw-r--r--examples/square.rs19
1 files changed, 19 insertions, 0 deletions
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);
+}