From eb376c1e687bbb5054d06bef3d11805c8dc0495e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 19 Oct 2023 19:36:54 -0700 Subject: [PATCH] put window stuff in here --- src/framework.rs | 5 ----- src/main.rs | 1 + src/window.rs | 9 +++++++++ 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/window.rs diff --git a/src/framework.rs b/src/framework.rs index e4fa3f9..1d0a985 100644 --- a/src/framework.rs +++ b/src/framework.rs @@ -39,11 +39,6 @@ pub trait Example: 'static + Sized { fn required_limits() -> wgpu::Limits { wgpu::Limits::downlevel_webgl2_defaults() // These downlevel limits will allow the code to run on all possible hardware } - fn init() -> Self; - fn resize(&mut self); - fn update(&mut self, window: &winit::window::Window, event: WindowEvent); - fn device_event(&mut self, window: &winit::window::Window, event: DeviceEvent); - fn render(&self); } struct Setup { diff --git a/src/main.rs b/src/main.rs index 69baaa0..b1bb527 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,6 +18,7 @@ mod primitives; mod instruction; mod load_roblox; mod render_thread; +mod window; pub struct GlobalState{ diff --git a/src/window.rs b/src/window.rs new file mode 100644 index 0000000..e572a34 --- /dev/null +++ b/src/window.rs @@ -0,0 +1,9 @@ +struct WindowState{ + //ok +} +impl WindowState{ + fn resize(&mut self); + fn update(&mut self, window: &winit::window::Window, event: WindowEvent); + fn device_event(&mut self, window: &winit::window::Window, event: DeviceEvent); + fn render(&self); +} \ No newline at end of file