Add repr(C) to GPU types

This commit is contained in:
Héctor Ramón Jiménez 2019-12-01 19:03:05 +01:00
parent 805c5ad0cd
commit 67570a0a1d
2 changed files with 4 additions and 0 deletions

View file

@ -427,6 +427,7 @@ pub struct Image {
pub scale: [f32; 2],
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct Vertex {
_position: [f32; 2],
@ -449,6 +450,7 @@ const QUAD_VERTS: [Vertex; 4] = [
},
];
#[repr(C)]
#[derive(Clone, Copy)]
struct Instance {
_position: [f32; 2],