summaryrefslogtreecommitdiffstats
path: root/graphics/src/gradient.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-29 07:48:03 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-29 07:48:03 +0200
commitfa5650cfd1115e6ccec2ad795cf58fd970d5b43c (patch)
tree90fa0706c8d28547fd4dae1000161082b52b9b27 /graphics/src/gradient.rs
parent2128472c2a8afcb59927712497c4f613612e9dcc (diff)
downloadiced-fa5650cfd1115e6ccec2ad795cf58fd970d5b43c.tar.gz
iced-fa5650cfd1115e6ccec2ad795cf58fd970d5b43c.tar.bz2
iced-fa5650cfd1115e6ccec2ad795cf58fd970d5b43c.zip
Decouple `Mesh` primitives from main `Primitive` type
Diffstat (limited to 'graphics/src/gradient.rs')
-rw-r--r--graphics/src/gradient.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs
index 3f5d0509..4db565d8 100644
--- a/graphics/src/gradient.rs
+++ b/graphics/src/gradient.rs
@@ -7,6 +7,7 @@ use crate::color;
use crate::core::gradient::ColorStop;
use crate::core::{self, Color, Point, Rectangle};
+use bytemuck::{Pod, Zeroable};
use half::f16;
use std::cmp::Ordering;
@@ -135,7 +136,7 @@ impl Linear {
}
/// Packed [`Gradient`] data for use in shader code.
-#[derive(Debug, Copy, Clone, PartialEq)]
+#[derive(Debug, Copy, Clone, PartialEq, Zeroable, Pod)]
#[repr(C)]
pub struct Packed {
// 8 colors, each channel = 16 bit float, 2 colors packed into 1 u32