From 396d3d661512284f147b3ba3500beb3e3c9a5751 Mon Sep 17 00:00:00 2001 From: CAD97 Date: Mon, 28 Jun 2021 20:49:57 -0500 Subject: [PATCH] Add missing repr(C) on bytemuckable geometry types --- src/geometry/orthographic.rs | 1 + src/geometry/perspective.rs | 1 + 2 files changed, 2 insertions(+) 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, }