diff --git a/kubi/src/rendering.rs b/kubi/src/rendering.rs index cc3df5f..33a052a 100644 --- a/kubi/src/rendering.rs +++ b/kubi/src/rendering.rs @@ -3,29 +3,23 @@ use winit::dpi::PhysicalSize; use glam::{Vec3, UVec2}; use crate::{events::WindowResizedEvent, state::is_ingame}; -pub mod renderer; +mod renderer; +pub use renderer::Renderer; + pub mod primitives; pub mod world; pub mod selection_box; pub mod entities; pub mod sumberge; -pub use renderer::Renderer; pub struct BufferPair { pub index: wgpu::Buffer, pub vertex: wgpu::Buffer, } #[derive(Unique)] -#[repr(transparent)] pub struct BackgroundColor(pub Vec3); -#[derive(Unique, Clone, Copy)] -#[repr(transparent)] -#[deprecated = "use Renderer.size instead"] -#[allow(deprecated)] -pub struct WindowSize(pub UVec2); - pub fn render_master(storages: AllStoragesViewMut) { let renderer = storages.borrow::>().unwrap(); @@ -77,6 +71,13 @@ pub fn resize_renderer( } //Deprecated WindowSize thingy + +#[derive(Unique, Clone, Copy)] +#[repr(transparent)] +#[deprecated = "use Renderer.size instead"] +#[allow(deprecated)] +pub struct WindowSize(pub UVec2); + pub fn init_window_size(storages: AllStoragesView) { let size = storages.borrow::>().unwrap().iter().next().unwrap().0; storages.add_unique(WindowSize(size))