summaryrefslogtreecommitdiff
path: root/bindgen/rust/celeritas-sys/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen/rust/celeritas-sys/src/lib.rs')
-rw-r--r--bindgen/rust/celeritas-sys/src/lib.rs53
1 files changed, 27 insertions, 26 deletions
diff --git a/bindgen/rust/celeritas-sys/src/lib.rs b/bindgen/rust/celeritas-sys/src/lib.rs
index 9ea3e47..5b65f5e 100644
--- a/bindgen/rust/celeritas-sys/src/lib.rs
+++ b/bindgen/rust/celeritas-sys/src/lib.rs
@@ -6,28 +6,29 @@ use serde::{Deserialize, Serialize};
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
-// // --- Conversions
-// pub mod conversions {
-// use crate::{Mat4, Vec3, Vec4};
+// --- Conversions
+pub mod conversions {
+ use crate::{mat4, vec3, vec4};
-// impl From<Vec3> for glam::Vec3 {
-// fn from(v: Vec3) -> Self {
-// Self {
-// x: v.x,
-// y: v.y,
-// z: v.z,
-// }
-// }
-// }
-// impl From<glam::Vec3> for Vec3 {
-// fn from(v: glam::Vec3) -> Self {
-// Self {
-// x: v.x,
-// y: v.y,
-// z: v.z,
-// }
-// }
-// }
+ impl From<vec3> for glam::Vec3 {
+ fn from(v: vec3) -> Self {
+ Self {
+ x: v.x,
+ y: v.y,
+ z: v.z,
+ }
+ }
+ }
+ impl From<glam::Vec3> for vec3 {
+ fn from(v: glam::Vec3) -> Self {
+ Self {
+ x: v.x,
+ y: v.y,
+ z: v.z,
+ }
+ }
+ }
+}
// impl From<Vec4> for glam::Vec4 {
// fn from(v: Vec4) -> Self {
@@ -102,14 +103,14 @@ include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
// };
// }
-impl Default for ShaderBinding {
+impl Default for shader_binding {
fn default() -> Self {
Self {
label: "static".as_ptr() as *const _,
- kind: ShaderBindingKind_BINDING_COUNT,
- vis: ShaderVisibility_VISIBILITY_VERTEX,
- data: ShaderBinding__bindgen_ty_1 {
- bytes: ShaderBinding__bindgen_ty_1__bindgen_ty_1 {
+ binding_type: shader_binding_type_BINDING_BUFFER,
+ visibility: shader_stage_STAGE_VERTEX,
+ data: shader_binding__bindgen_ty_1 {
+ bytes: shader_binding__bindgen_ty_1__bindgen_ty_1 {
size: 0,
data: std::ptr::null_mut(),
},