diff --git a/CHANGELOG.md b/CHANGELOG.md index 823b798c3..6a156eba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v0.3.0 + +### Changes + +- Updated `easygpu` to 0.3.0: + - `wgpu` has been updated to 0.14.0. + - `winit` has been updated to 0.27.4. + ## v0.2.0 ### Changes diff --git a/app/Cargo.toml b/app/Cargo.toml index 40908b484..a9d63ef6d 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kludgine-app" -version = "0.2.0" +version = "0.3.0" authors = ["Jonathan Johnson "] edition = "2018" description = "Application and Windowing for Kludgine" @@ -17,7 +17,7 @@ tokio-rt = ["tokio"] smol-rt = ["smol", "smol-timeout", "easy-parallel"] [dependencies] -kludgine-core = { version = "0.2.0", path = "../core" } +kludgine-core = { version = "0.3.0", path = "../core" } parking_lot = "0.12.0" tracing = "0.1.29" diff --git a/app/src/runtime.rs b/app/src/runtime.rs index 45e5c3c36..58c089d2e 100644 --- a/app/src/runtime.rs +++ b/app/src/runtime.rs @@ -230,7 +230,8 @@ impl Runtime { where T: Window + Sized + 'static, { - let event_loop = winit::event_loop::EventLoop::::with_user_event(); + let event_loop = + winit::event_loop::EventLoopBuilder::::with_user_event().build(); let initial_system_theme = initial_window.initial_system_theme.unwrap_or(Theme::Light); let mut initial_window: winit::window::WindowBuilder = initial_window.into(); @@ -360,10 +361,10 @@ impl Runtime { } pub(crate) fn winit_window( - id: &WindowId, + id: WindowId, ) -> Option> { let windows = WINIT_WINDOWS.read(); - RwLockReadGuard::try_map(windows, |windows| windows.get(id)).ok() + RwLockReadGuard::try_map(windows, |windows| windows.get(&id)).ok() } } diff --git a/app/src/window/runtime_window.rs b/app/src/window/runtime_window.rs index 85504b156..3a943e83e 100644 --- a/app/src/window/runtime_window.rs +++ b/app/src/window/runtime_window.rs @@ -510,7 +510,7 @@ pub struct WindowHandle(pub WindowId); impl WindowHandle { /// Sets the window title. pub fn set_title(&self, title: &str) { - if let Some(window) = Runtime::winit_window(&self.0) { + if let Some(window) = Runtime::winit_window(self.0) { window.set_title(title); } } @@ -518,14 +518,14 @@ impl WindowHandle { /// Returns the size of the content area of the window. #[must_use] pub fn inner_size(&self) -> Size { - Runtime::winit_window(&self.0) + Runtime::winit_window(self.0) .map(|window| Size::new(window.inner_size().width, window.inner_size().height)) .unwrap_or_default() } /// Attempts to resize the window to `new_size`. This may not work on all platforms. pub fn set_inner_size(&self, new_size: Size) { - if let Some(window) = Runtime::winit_window(&self.0) { + if let Some(window) = Runtime::winit_window(self.0) { window.set_inner_size(PhysicalSize::new(new_size.width, new_size.height)); } } @@ -534,7 +534,7 @@ impl WindowHandle { /// platforms where this is unsupported, `innner_position()` is returned. #[must_use] pub fn outer_position(&self) -> Point { - Runtime::winit_window(&self.0) + Runtime::winit_window(self.0) .and_then(|window| window.outer_position().ok()) .map(|position| Point::new(position.x, position.y)) .unwrap_or_default() @@ -542,7 +542,7 @@ impl WindowHandle { /// Sets the outer position of the window. This may not work on all platforms. pub fn set_outer_position(&self, new_position: Point) { - if let Some(window) = Runtime::winit_window(&self.0) { + if let Some(window) = Runtime::winit_window(self.0) { window.set_outer_position(PhysicalPosition::new(new_position.x, new_position.y)); } } @@ -550,7 +550,7 @@ impl WindowHandle { /// Returns the position of the top-left of the content area in screen coordinates. #[must_use] pub fn inner_position(&self) -> Point { - Runtime::winit_window(&self.0) + Runtime::winit_window(self.0) .and_then(|window| window.inner_position().ok()) .map(|position| Point::new(position.x, position.y)) .unwrap_or_default() @@ -558,7 +558,7 @@ impl WindowHandle { /// Sets whether the window should always be on top of other windows. pub fn set_always_on_top(&self, always: bool) { - if let Some(window) = Runtime::winit_window(&self.0) { + if let Some(window) = Runtime::winit_window(self.0) { window.set_always_on_top(always); } } @@ -566,7 +566,7 @@ impl WindowHandle { /// Returns true if the window is maximized. #[must_use] pub fn maximized(&self) -> bool { - if let Some(window) = Runtime::winit_window(&self.0) { + if let Some(window) = Runtime::winit_window(self.0) { window.is_maximized() } else { false @@ -575,14 +575,14 @@ impl WindowHandle { /// Sets whether the window should be maximized. pub fn set_maximized(&self, maximized: bool) { - if let Some(window) = Runtime::winit_window(&self.0) { + if let Some(window) = Runtime::winit_window(self.0) { window.set_maximized(maximized); } } /// Sets whether the window should be minimized. pub fn set_minimized(&self, minimized: bool) { - if let Some(window) = Runtime::winit_window(&self.0) { + if let Some(window) = Runtime::winit_window(self.0) { window.set_minimized(minimized); } } diff --git a/core/Cargo.toml b/core/Cargo.toml index 04bc1306c..9d9436ce0 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kludgine-core" -version = "0.2.0" +version = "0.3.0" authors = ["Jonathan Johnson "] edition = "2018" description = "2D rendering for Kludgine" @@ -29,8 +29,8 @@ serialization = ["serde", "figures/serde", "palette/serializing"] [dependencies] approx = "0.5.1" -easygpu = "0.2.0" -easygpu-lyon = "0.2.0" +easygpu = "0.3.0" +easygpu-lyon = "0.3.0" image = { version = "0.24.0", default-features = false } palette = "0.6.0" futures-timer = "3.0.2" @@ -42,7 +42,7 @@ rusttype = { version = "0.9.2", features = ["gpu_cache"] } ttf-parser = "0.14.0" json = "0.12.4" serde = { version = "1.0.136", optional = true, features = ["derive"] } -winit = "0.26.1" +winit = "0.27.4" bytemuck = { version = "1.7.3", features = ["derive"] } lazy_static = "1.4.0" thiserror = "1.0.30" diff --git a/core/src/shape/path.rs b/core/src/shape/path.rs index 12ed1fe51..8583a3575 100644 --- a/core/src/shape/path.rs +++ b/core/src/shape/path.rs @@ -158,7 +158,6 @@ impl Path { for event in &self.events { // There's a bug with async-local variables and this analysis. There is no // cross-dependency on any of these parameters. - #[allow(clippy::eval_order_dependence)] events.push(match event { PathEvent::Begin { at } => PathEvent::Begin { at: *at + location }, PathEvent::Line { from, to } => PathEvent::Line { diff --git a/kludgine/Cargo.toml b/kludgine/Cargo.toml index 2621a785d..9c1ee7c56 100644 --- a/kludgine/Cargo.toml +++ b/kludgine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kludgine" -version = "0.2.0" +version = "0.3.0" authors = ["Jonathan Johnson "] edition = "2018" description = "An asynchronous app and 2d game framework" @@ -27,8 +27,8 @@ bundled-fonts-roboto = ["kludgine-core/bundled-fonts-roboto"] serialization = ["kludgine-core/serialization"] [dependencies] -kludgine-core = { version = "0.2.0", path = "../core" } -kludgine-app = { version = "0.2.0", path = "../app", optional = true, default-features = false } +kludgine-core = { version = "0.3.0", path = "../core" } +kludgine-app = { version = "0.3.0", path = "../app", optional = true, default-features = false } cfg-if = "1.0.0" # [target.'cfg(target_arch = "wasm32")'.dependencies]