summaryrefslogtreecommitdiff
path: root/engine/src/rendering/shader/cursor.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-07-17 03:06:04 +0200
committerHampusM <hampus@hampusmat.com>2026-07-17 03:06:04 +0200
commit65e24308babb2ed4f33fb6f1d7b531df676bd70d (patch)
treedf9477d4b805cc6866a086833d6118505804dd3a /engine/src/rendering/shader/cursor.rs
parent649d4d4ab2f54ca12f75d2cba50e1adef2350dbe (diff)
refactor(engine): change Color struct into a enum
Diffstat (limited to 'engine/src/rendering/shader/cursor.rs')
-rw-r--r--engine/src/rendering/shader/cursor.rs10
1 files changed, 10 insertions, 0 deletions
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<f32>),
+ Color(Color<f32>),
FMat4x4(Matrix<f32, 4, 4>),
Texture(RenderingObjectId),
}
@@ -150,6 +152,14 @@ impl From<Vec3<f32>> for BindingValue
}
}
+impl From<Color<f32>> for BindingValue
+{
+ fn from(color: Color<f32>) -> Self
+ {
+ BindingValue::Color(color)
+ }
+}
+
impl From<Matrix<f32, 4, 4>> for BindingValue
{
fn from(matrix: Matrix<f32, 4, 4>) -> Self