kitgit

tirbofish/dropbear · diff

ac47895 · tk

changing to rc refs instead of boxes for shared scene mgmt and so on

Unverified

diff --git a/.gitignore b/.gitignore
index a0fbdf1..5ce925a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@ target
 #  option (not recommended) you can uncomment the following to ignore the entire idea folder.
 .idea/
 Cargo.lock
+dropbear-engine/src/resources/textures/Autism.png
diff --git a/dropbear-engine/src/graphics.rs b/dropbear-engine/src/graphics.rs
index 305137c..a6294f4 100644
--- a/dropbear-engine/src/graphics.rs
+++ b/dropbear-engine/src/graphics.rs
@@ -148,7 +148,7 @@ impl Shader {
 }
 
 pub struct Texture {
-    pub diffuse: wgpu::BindGroup,
+    pub bind_group: wgpu::BindGroup,
     pub layout: wgpu::BindGroupLayout,
 }
 
@@ -239,12 +239,12 @@ impl Texture {
                         resource: wgpu::BindingResource::Sampler(&diffuse_sampler),
                     }
                 ],
-                label: Some("diffuse_bind_group"),
+                label: Some("texture_bind_group"),
             }
         );
         
         Self {
-            diffuse: diffuse_bind_group,
+            bind_group: diffuse_bind_group,
             layout: texture_bind_group_layout,
         }
     }
diff --git a/dropbear-engine/src/input.rs b/dropbear-engine/src/input.rs
index c9582a5..e1cdc0e 100644
--- a/dropbear-engine/src/input.rs
+++ b/dropbear-engine/src/input.rs
@@ -1,8 +1,11 @@
-use std::collections::{HashMap, HashSet};
+use std::{cell::RefCell, collections::{HashMap, HashSet}, rc::Rc};
 use winit::{
     dpi::PhysicalPosition, event::MouseButton, event_loop::ActiveEventLoop, keyboard::KeyCode,
 };
 
+pub type KeyboardImpl = Rc<RefCell<dyn Keyboard>>;
+pub type MouseImpl = Rc<RefCell<dyn Mouse>>;

Large diffs are not rendered by default. Showing the first 50 of 324 lines. Show full diff