Skip to content

Commit

Permalink
Updating to easygpu 0.2/wgpu 0.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Jul 31, 2022
1 parent a0075ab commit 6998f2c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ members = ["kludgine", "core", "app", "xtask"]
resolver = "2"

[patch.crates-io]
easygpu = { git = "https://github.com/khonsulabs/easygpu.git", branch = "main" }
easygpu-lyon = { git = "https://github.com/khonsulabs/easygpu.git", branch = "main" }
# easygpu = { git = "https://github.com/khonsulabs/easygpu.git", branch = "main" }
# easygpu-lyon = { git = "https://github.com/khonsulabs/easygpu.git", branch = "main" }
# must be commented out for CI to succeed
# easygpu = { path = "../easygpu/easygpu", version = "0.1.0" }
# easygpu-lyon = { path = "../easygpu/lyon", version = "0.1.0" }
Expand Down
1 change: 0 additions & 1 deletion app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ tokio = { version = "1.16.1", features = ["full"], optional = true }

once_cell = "1.9.0"
lazy_static = "1.4.0"
platforms = "2.0.0"
thiserror = "1.0.30"
anyhow = "1.0.53"
futures = "0.3.19"
1 change: 0 additions & 1 deletion app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
clippy::cargo,
missing_docs,
// clippy::missing_docs_in_private_items,
clippy::nursery,
clippy::pedantic,
future_incompatible,
rust_2018_idioms,
Expand Down
3 changes: 1 addition & 2 deletions app/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use kludgine_core::{
},
};
use parking_lot::{MappedRwLockReadGuard, Mutex, RwLock, RwLockReadGuard};
use platforms::target::{OS, TARGET_OS};

use crate::{
application::Application,
Expand Down Expand Up @@ -223,7 +222,7 @@ impl Runtime {
}

const fn should_run_in_exclusive_mode() -> bool {
matches!(TARGET_OS, OS::Android | OS::iOS)
cfg!(any(target_os = "android", target_os = "ios"))
}

/// Executes the runtime's event loop.
Expand Down
4 changes: 2 additions & 2 deletions app/src/window/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl<T: Window> OpenWindow<T> {
}
}

pub(crate) fn next_redraw_target(&self) -> RedrawTarget {
pub(crate) const fn next_redraw_target(&self) -> RedrawTarget {
self.redraw_status.next_redraw_target
}

Expand Down Expand Up @@ -268,7 +268,7 @@ pub enum UpdateSchedule {
impl RedrawTarget {
pub(crate) const fn next_update_instant(&self) -> Option<UpdateSchedule> {
match self {
RedrawTarget::Never => None,
Self::Never => None,
Self::None => Some(UpdateSchedule::Now),
Self::Scheduled(scheduled_for) => Some(UpdateSchedule::Scheduled(*scheduled_for)),
}
Expand Down
5 changes: 2 additions & 3 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ serialization = ["serde", "figures/serde", "palette/serializing"]

[dependencies]
approx = "0.5.1"
easygpu = "0.1.0"
easygpu-lyon = "0.1.0"
easygpu = "0.2.0"
easygpu-lyon = "0.2.0"
image = { version = "0.24.0", default-features = false }
palette = "0.6.0"
futures-timer = "3.0.2"
Expand All @@ -39,7 +39,6 @@ futures = "0.3.19"
instant = "0.1.12"
flume = "0.10.10"
rusttype = { version = "0.9.2", features = ["gpu_cache"] }
platforms = "2.0.0"
ttf-parser = "0.14.0"
json = "0.12.4"
serde = { version = "1.0.136", optional = true, features = ["derive"] }
Expand Down
1 change: 0 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
clippy::cargo,
missing_docs,
// clippy::missing_docs_in_private_items,
clippy::nursery,
clippy::pedantic,
future_incompatible,
rust_2018_idioms,
Expand Down
24 changes: 17 additions & 7 deletions core/src/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::{
};

use figures::{DisplayScale, Displayable, One, Pixels, Points, Rectlike, SizedRect};
use platforms::target::{OS, TARGET_OS};
use winit::{event::VirtualKeyCode, window::Theme};

use crate::{
Expand Down Expand Up @@ -179,20 +178,31 @@ impl Modifiers {
/// returns `control`.
#[must_use]
pub const fn primary_modifier(&self) -> bool {
match TARGET_OS {
OS::MacOS | OS::iOS => self.operating_system,
_ => self.control,
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
self.operating_system
}

#[cfg(not(any(target_os = "macos", target_os = "ios")))]
{
self.control
}
}

/// Returns true if the command key/Apple key is pressed. This only returns
/// true if `operating_system` key is true and the current operating system
/// is Mac or iOS.
#[must_use]
#[allow(clippy::unused_self)]
pub const fn command_key(&self) -> bool {
match TARGET_OS {
OS::MacOS | OS::iOS => self.operating_system,
_ => false,
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
self.operating_system
}

#[cfg(not(any(target_os = "macos", target_os = "ios")))]
{
false
}
}
}
Expand Down
1 change: 0 additions & 1 deletion kludgine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
clippy::cargo,
missing_docs,
// clippy::missing_docs_in_private_items,
clippy::nursery,
clippy::pedantic,
future_incompatible,
rust_2018_idioms,
Expand Down

0 comments on commit 6998f2c

Please sign in to comment.