From 65e24308babb2ed4f33fb6f1d7b531df676bd70d Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 17 Jul 2026 03:06:04 +0200 Subject: refactor(engine): change Color struct into a enum --- engine/src/rendering/shader/cursor.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engine/src/rendering/shader/cursor.rs') diff --git a/engine/src/rendering/shader/cursor.rs b/engine/src/rendering/shader/cursor.rs index 17f5748..8aab4f2 100644 --- a/engine/src/rendering/shader/cursor.rs +++ b/engine/src/rendering/shader/cursor.rs @@ -1,3 +1,4 @@ +use crate::color::Color; use crate::data_types::matrix::Matrix; use crate::data_types::vector::Vec3; use crate::rendering::object::Id as RenderingObjectId; @@ -114,6 +115,7 @@ pub enum BindingValue Int(i32), Float(f32), FVec3(Vec3), + Color(Color), FMat4x4(Matrix), Texture(RenderingObjectId), } @@ -150,6 +152,14 @@ impl From> for BindingValue } } +impl From> for BindingValue +{ + fn from(color: Color) -> Self + { + BindingValue::Color(color) + } +} + impl From> for BindingValue { fn from(matrix: Matrix) -> Self -- cgit v1.2.3-18-g5258