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

@ -1,5 +1,5 @@
//! A rectangle with certain styled properties.
use crate::graphics::gradient;
use bytemuck::{Pod, Zeroable};
/// The properties of a quad.
@ -38,7 +38,7 @@ pub struct Solid {
#[repr(C)]
pub struct Gradient {
/// The background gradient data of the quad.
pub gradient: [f32; 44],
pub gradient: gradient::Packed,
/// The [`Quad`] data of the [`Gradient`].
pub quad: Quad,