From 1049ec12688032728c8015a5e017fc47cf00f77b Mon Sep 17 00:00:00 2001
From: griffi-gh <prasol258@gmail.com>
Date: Mon, 31 Mar 2025 14:22:44 +0200
Subject: [PATCH] wip hui-euc

---
 hui-euc/Cargo.toml |  2 +-
 hui-euc/src/lib.rs | 35 +++++++++++++++++++++++++++++++++--
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/hui-euc/Cargo.toml b/hui-euc/Cargo.toml
index 7e6ce8f..6a1496e 100644
--- a/hui-euc/Cargo.toml
+++ b/hui-euc/Cargo.toml
@@ -5,7 +5,7 @@ edition = "2024"
 publish = false
 
 [dependencies]
-euc = { version = "0.5", default-features = false, features = ["libm"] }
+euc = { version = "0.5", default-features = false }
 
 [features]
 default = [ "std" ]
diff --git a/hui-euc/src/lib.rs b/hui-euc/src/lib.rs
index b76e8f4..e354c3b 100644
--- a/hui-euc/src/lib.rs
+++ b/hui-euc/src/lib.rs
@@ -1,3 +1,34 @@
-#![no_std]
+#![cfg_attr(not(feature = "std"), no_std)]
 
-// TODO
\ No newline at end of file
+// TODO
+
+use euc::Pipeline;
+
+struct UiPipeline;
+
+impl Pipeline for UiPipeline {
+  type Vertex = [f32; 2];
+  type VsOut = ();
+  type Pixel = [u8; 4];
+
+  // Vertex shader
+  fn vert(&self, pos: &Self::Vertex) -> ([f32; 4], Self::VsOut) {
+    ([pos[0], pos[1], 0.0, 1.0], ())
+  }
+
+  // Fragment shader
+  fn frag(&self, _: &Self::VsOut) -> Self::Pixel {
+    [0, 0, 0, 255]
+  }
+}
+
+// fn main() {
+//   let mut color = Buffer2d::new([640, 480], [0; 4]);
+//   let mut depth = Buffer2d::new([640, 480], 1.0);
+
+//   Example.draw::<Triangles<_>, _>(
+//     &[[-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]],
+//     &mut color,
+//     &mut depth,
+//   );
+// }