diff --git a/src/geometry/orthographic.rs b/src/geometry/orthographic.rs index ade84092..836edc93 100644 --- a/src/geometry/orthographic.rs +++ b/src/geometry/orthographic.rs @@ -18,6 +18,7 @@ use crate::base::{Matrix4, Vector, Vector3}; use crate::geometry::{Point3, Projective3}; /// A 3D orthographic projection stored as a homogeneous 4x4 matrix. +#[repr(C)] pub struct Orthographic3 { matrix: Matrix4, } diff --git a/src/geometry/perspective.rs b/src/geometry/perspective.rs index c7dd8b3e..08b2608b 100644 --- a/src/geometry/perspective.rs +++ b/src/geometry/perspective.rs @@ -19,6 +19,7 @@ use crate::base::{Matrix4, Scalar, Vector, Vector3}; use crate::geometry::{Point3, Projective3}; /// A 3D perspective projection stored as a homogeneous 4x4 matrix. +#[repr(C)] pub struct Perspective3 { matrix: Matrix4, }