Changed gradient::Packed to be repr(C) for direct gpu upload.
This commit is contained in:
parent
413526ad09
commit
902e333148
5 changed files with 31 additions and 22 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue