summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock3
-rw-r--r--Cargo.toml1
-rw-r--r--src/main.rs21
3 files changed, 24 insertions, 1 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 8199337..df893dd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -114,6 +114,9 @@ dependencies = [
[[package]]
name = "game-newest"
version = "0.1.0"
+dependencies = [
+ "engine",
+]
[[package]]
name = "gl"
diff --git a/Cargo.toml b/Cargo.toml
index 44b6558..50f82e0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,3 +7,4 @@ edition = "2021"
members = ["glfw", "engine"]
[dependencies]
+engine = { path = "./engine" }
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(())
+}