diff --git a/src/model/mesh.rs b/src/model/mesh.rs index 3de5cd6..d06c90c 100644 --- a/src/model/mesh.rs +++ b/src/model/mesh.rs @@ -16,6 +16,7 @@ use crate::shader::shader; // NOTE: without repr(C) the compiler may reorder the fields or use different padding/alignment than C. // Depending on how you pass the data to OpenGL, this may be bad. In this case it's not strictly // necessary though because of the `offset!` macro used below in setupMesh() +#[repr(C)] #[derive(Clone)] pub struct Vertex { // position