use safer_ffi::derive_ReprC; use safer_ffi::layout::ReprC; #[derive(Debug, Clone)] #[derive_ReprC] #[repr(C)] pub struct Matrix { /// Items must be layed out this way for it to work with OpenGL shaders. pub items: [[Value; ROWS]; COLUMNS], } #[derive(Debug, Clone)] #[derive_ReprC] #[repr(C)] pub struct Vec3 { pub x: Value, pub y: Value, pub z: Value, } #[derive(Debug, Clone)] #[derive_ReprC] #[repr(C)] pub struct Vec2 { pub x: Value, pub y: Value, } #[derive(Debug, Clone)] pub struct Dimens { pub width: Value, pub height: Value, }