From fa5650cfd1115e6ccec2ad795cf58fd970d5b43c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 29 Jun 2023 07:48:03 +0200 Subject: Decouple `Mesh` primitives from main `Primitive` type --- graphics/src/gradient.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'graphics/src/gradient.rs') 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 -- cgit