summaryrefslogtreecommitdiff
path: root/engine/src/rendering/shader
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/rendering/shader')
-rw-r--r--engine/src/rendering/shader/cursor.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/engine/src/rendering/shader/cursor.rs b/engine/src/rendering/shader/cursor.rs
index 82b5ec0..49f6b47 100644
--- a/engine/src/rendering/shader/cursor.rs
+++ b/engine/src/rendering/shader/cursor.rs
@@ -4,7 +4,7 @@ use std::hint::cold_path;
use circular_buffer::FixedCircularBuffer;
-use crate::color::Color;
+use crate::color::{Color, Rgb, Rgba};
use crate::data_types::matrix::Matrix;
use crate::data_types::vector::Vec3;
use crate::rendering::object::Id as RenderingObjectId;
@@ -319,6 +319,21 @@ impl From<Color<f32>> for BindingValue
BindingValue::Color(color)
}
}
+impl From<Rgb<f32>> for BindingValue
+{
+ fn from(color: Rgb<f32>) -> Self
+ {
+ BindingValue::Color(color.into())
+ }
+}
+
+impl From<Rgba<f32>> for BindingValue
+{
+ fn from(color: Rgba<f32>) -> Self
+ {
+ BindingValue::Color(color.into())
+ }
+}
impl From<Matrix<f32, 4, 4>> for BindingValue
{