From 4505fb6585885866ff9a76f76c00ed727d3bb818 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:46:38 +1000 Subject: wip --- bindgen/rust/src/lib.rs | 10 +++++----- bindgen/rust/src/prelude.rs | 11 +++++++++++ bindgen/rust/src/ral.rs | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) (limited to 'bindgen') diff --git a/bindgen/rust/src/lib.rs b/bindgen/rust/src/lib.rs index c8e56df..cfb999c 100644 --- a/bindgen/rust/src/lib.rs +++ b/bindgen/rust/src/lib.rs @@ -21,14 +21,14 @@ use serde::{Deserialize, Serialize}; /// Wrapper around a string that is the path to a gltf model **relative** to the configured /// `ASSETS` folder -#[derive(Debug, Serialize, Deserialize)] -pub struct ModelPath(String); +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ModelPath(pub String); /// #[derive(Debug, Serialize, Deserialize)] pub struct ModelNode { - model_path: ModelPath, - transform: Transform, + pub model_path: ModelPath, + pub transform: Transform, } /// Scene that can be saved and loaded from disk @@ -63,4 +63,4 @@ pub enum Light { Point(ffi::PointLight), Directional(ffi::DirectionalLight), // Spot(ffi::Spotlight) -} +} \ No newline at end of file diff --git a/bindgen/rust/src/prelude.rs b/bindgen/rust/src/prelude.rs index 097239a..c81fbe0 100644 --- a/bindgen/rust/src/prelude.rs +++ b/bindgen/rust/src/prelude.rs @@ -1,4 +1,15 @@ +/// --- maths types pub use celeritas_sys::Mat4; pub use celeritas_sys::Vec2; pub use celeritas_sys::Vec3; pub use celeritas_sys::Vec4; + +// --- handles +pub use celeritas_sys::BufferHandle; +pub use celeritas_sys::TextureHandle; +pub use celeritas_sys::MeshHandle; +pub use celeritas_sys::MaterialHandle; +pub use celeritas_sys::ModelHandle; +pub use celeritas_sys::PipelineHandle; +pub use celeritas_sys::RenderpassHandle; +pub use celeritas_sys::PipelineLayoutHandle; \ No newline at end of file diff --git a/bindgen/rust/src/ral.rs b/bindgen/rust/src/ral.rs index f9c44e4..5568954 100644 --- a/bindgen/rust/src/ral.rs +++ b/bindgen/rust/src/ral.rs @@ -1,7 +1,7 @@ //! Wrapper around the RAL code in celeritas-core use celeritas_sys::{ - BufferHandle, GPU_Buffer, GPU_CmdEncoder, GPU_CmdEncoder_BeginRender, GPU_CmdEncoder_EndRender, GPU_GetDefaultEncoder + BufferHandle, GPU_CmdEncoder, GPU_CmdEncoder_BeginRender, GPU_CmdEncoder_EndRender, GPU_GetDefaultEncoder }; pub struct FrameRenderEncoder(*mut GPU_CmdEncoder); -- cgit v1.2.3-70-g09d2