From 72b8d26fcfcee36ca67f963b9c6a4b616e2d5d4d Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Mon, 12 Aug 2024 00:15:33 +1000 Subject: scale is a vec3 now instead of float. --- bindgen/rust/celeritas-sys/build.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'bindgen/rust/celeritas-sys/build.rs') diff --git a/bindgen/rust/celeritas-sys/build.rs b/bindgen/rust/celeritas-sys/build.rs index de12094..f0a1d36 100644 --- a/bindgen/rust/celeritas-sys/build.rs +++ b/bindgen/rust/celeritas-sys/build.rs @@ -3,23 +3,26 @@ use std::path::PathBuf; use bindgen::callbacks::ParseCallbacks; -const SERIALIZABLE_TYPES: &[&'static str] = &[ +const SERIALIZABLE_TYPES: &[&str] = &[ "Vec2", "Vec3", "Vec4", "Mat4", "Quat", "Transform", + "Bbox_3D", + "OBB", "DirectionalLight", "PointLight", ]; -const EQ_TYPES: &[&'static str] = &[ +const EQ_TYPES: &[&str] = &[ "BufferHandle", "TextureHandle", "MeshHandle", "MaterialHandle", "ModelHandle", ]; +const DEFAULT_TYPES: &[&str] = &["ShaderDataLayout"]; #[derive(Debug)] struct AdditionalDerives; @@ -32,6 +35,9 @@ impl ParseCallbacks for AdditionalDerives { if EQ_TYPES.contains(&info.name) { derives.extend_from_slice(&["PartialEq".to_string()]); } + if DEFAULT_TYPES.contains(&info.name) { + derives.push("Default".to_string()); + } derives } } @@ -44,8 +50,7 @@ fn main() { // println!("cargo:rustc-link-search=../../build/windows/x64/debug"); let static_lib_path = - "/Users/josh/code/CodenameVentus/deps/celeritas-core/build/macosx/arm64/debug" - .to_string(); + "/Users/josh/code/CodenameVentus/deps/celeritas-core/build/macosx/arm64/debug".to_string(); // let static_lib_path = std::env::var("CELERITAS_CORE_LIB") // .unwrap_or("../../../build/macosx/arm64/debug".to_string()); -- cgit v1.2.3-70-g09d2