summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-10-07 20:56:34 +0200
committerHampusM <hampus@hampusmat.com>2023-10-07 20:56:34 +0200
commitfefe6b84f0e94d8ea941964cd2f34cc159d990df (patch)
tree91fc98608b584761eec3fdb4c9b1be2ff0f82804 /src/main.rs
parent715bbaf459b88575e11d90ec16bad3841bafd259 (diff)
feat: add triangle program
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index f328e4d..293868f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1 +1,20 @@
-fn main() {}
+use std::error::Error;
+
+use engine::object::Object;
+use engine::{Engine, WindowSize};
+
+const WINDOW_SIZE: WindowSize = WindowSize {
+ width: 500,
+ height: 600,
+};
+
+fn main() -> Result<(), Box<dyn Error>>
+{
+ let engine = Engine::new(&WINDOW_SIZE, "Yaaay lmao")?;
+
+ let triangle = Object::new(&[-0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.0, 0.5, 0.0])?;
+
+ engine.start(&[triangle], || {})?;
+
+ Ok(())
+}