From aa1eeebb1c05edc22335cbb48af5d42be20750c0 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:20:13 +1000 Subject: moving some maths functions to implementation file --- bindgen/rust/src/egui_utils.rs | 72 ------------------------------------------ bindgen/rust/src/lib.rs | 7 ---- bindgen/rust/src/main.rs | 3 ++ 3 files changed, 3 insertions(+), 79 deletions(-) delete mode 100644 bindgen/rust/src/egui_utils.rs delete mode 100644 bindgen/rust/src/lib.rs create mode 100644 bindgen/rust/src/main.rs (limited to 'bindgen/rust/src') diff --git a/bindgen/rust/src/egui_utils.rs b/bindgen/rust/src/egui_utils.rs deleted file mode 100644 index 5432d81..0000000 --- a/bindgen/rust/src/egui_utils.rs +++ /dev/null @@ -1,72 +0,0 @@ -// use egui_overlay::{EguiOverlay, OverlayApp}; -// use egui_render_three_d::ThreeDBackend; -// use egui_window_glfw_passthrough::glfw::Context; -// use egui_window_glfw_passthrough::{GlfwBackend, GlfwConfig}; - -// use crate::Core_Bringup; - -// // struct CustomEguiOverlay { -// // backend: -// // } - -// fn init() { -// let mut glfw_backend = GlfwBackend::new(GlfwConfig::default()); -// let mut glfw_window_ptr = glfw_backend.window.window_ptr(); - -// unsafe { -// // Cast the window pointer to the expected type -// let window_ptr = glfw_window_ptr as *mut crate::GLFWwindow; -// Core_Bringup(window_ptr); -// }; -// } - -// /// After implementing [`EguiOverlay`], just call this function with your app data -// pub fn start(user_data: T) { -// let mut glfw_backend = GlfwBackend::new(GlfwConfig { -// // this closure will be called before creating a window -// glfw_callback: Box::new(|gtx| { -// // some defualt hints. it is empty atm, but in future we might add some convenience hints to it. -// (egui_window_glfw_passthrough::GlfwConfig::default().glfw_callback)(gtx); -// // scale the window size based on monitor scale. as 800x600 looks too small on a 4k screen, compared to a hd screen in absolute pixel sizes. -// gtx.window_hint(egui_window_glfw_passthrough::glfw::WindowHint::ScaleToMonitor(true)); -// }), -// opengl_window: Some(true), // macos doesn't support opengl. -// transparent_window: Some(false), -// window_title: "Celeritas egui".into(), -// ..Default::default() -// }); - -// // always on top -// // glfw_backend.window.set_floating(true); -// // disable borders/titlebar -// // glfw_backend.window.set_decorated(false); - -// let latest_size = glfw_backend.window.get_framebuffer_size(); -// let latest_size = [latest_size.0 as _, latest_size.1 as _]; - -// let default_gfx_backend = { -// ThreeDBackend::new( -// egui_render_three_d::ThreeDConfig { -// ..Default::default() -// }, -// |s| glfw_backend.get_proc_address(s), -// latest_size, -// ) -// }; - -// let glfw_window_ptr = glfw_backend.window.window_ptr(); -// unsafe { -// // Cast the window pointer to the expected type -// let window_ptr = glfw_window_ptr as *mut crate::GLFWwindow; -// Core_Bringup(window_ptr); -// }; - -// let overlap_app = OverlayApp { -// user_data, -// egui_context: Default::default(), -// default_gfx_backend, -// glfw_backend, -// }; - -// overlap_app.enter_event_loop(); -// } diff --git a/bindgen/rust/src/lib.rs b/bindgen/rust/src/lib.rs deleted file mode 100644 index 1f64680..0000000 --- a/bindgen/rust/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![allow(non_upper_case_globals)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] - -pub mod egui_utils; - -include!(concat!(env!("OUT_DIR"), "/bindings.rs")); diff --git a/bindgen/rust/src/main.rs b/bindgen/rust/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/bindgen/rust/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} -- cgit v1.2.3-70-g09d2