Changed gradient::Packed to be repr(C) for direct gpu upload.

This commit is contained in:
Bingus 2023-05-26 10:07:52 -07:00
parent 413526ad09
commit 902e333148
No known key found for this signature in database
GPG key ID: 5F84D2AA40A9F170
5 changed files with 31 additions and 22 deletions

View file

@ -4,6 +4,7 @@ use crate::core::image;
use crate::core::svg;
use crate::core::text;
use crate::core::{Background, Color, Font, Rectangle, Size, Vector};
use crate::gradient;
use bytemuck::{Pod, Zeroable};
use std::sync::Arc;
@ -258,7 +259,7 @@ pub struct GradientVertex2D {
pub position: [f32; 2],
/// The packed vertex data of the gradient.
pub gradient: [f32; 44],
pub gradient: gradient::Packed,
}
#[allow(unsafe_code)]