Skip to content

Commit

Permalink
Merge pull request #247 from Nazariglez/develop
Browse files Browse the repository at this point in the history
v0.9.4
  • Loading branch information
Nazariglez committed Feb 25, 2023
2 parents abc0a9f + 53267b4 commit 4c2013b
Show file tree
Hide file tree
Showing 41 changed files with 314 additions and 160 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.

## v0.9.4 - 26/02/2023

- Added `WindowBackend::set_title` and `WindowBackend::title` to change or get the title at any time.
- Improved stencil clearing when setting a mask on the draw api at the end of the pass.
- Fix panic using Draw API to draw text with `max_width` and `size` as 0.
- Fix `debug_assert` in `Device::inner_read_pixels`.
- Added support for `include` directives using `shaderc`.
- Added optional feature `serde` to serialize/deserialize some core types.

## v0.9.3 - 12/02/2023

- Added `WindowBackend::screen_size` to get the screen's resolution size.
Expand Down
48 changes: 27 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 18 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notan"
version = "0.9.3"
version = "0.9.4"
authors = ["Nazarí González <[email protected]>"]
edition = "2021"
categories = ["graphics", "rendering", "wasm", "gui", "multimedia"]
Expand All @@ -19,22 +19,22 @@ features = ["default", "glyph", "egui", "text", "extra", "audio", "links", "drop
lto = true

[dependencies]
notan_core = { path = "crates/notan_core", version = "0.9.3" }
notan_input = { path = "crates/notan_input", version = "0.9.3" }
notan_app = { path = "crates/notan_app", version = "0.9.3" }
notan_macro = { path = "crates/notan_macro", version = "0.9.3" }
notan_math = { path = "crates/notan_math", version = "0.9.3" }
notan_graphics = { path = "crates/notan_graphics", version = "0.9.3" }
notan_utils = { path = "crates/notan_utils", version = "0.9.3" }
notan_log = { path = "crates/notan_log", version = "0.9.3", optional = true }
notan_glyph = { path = "crates/notan_glyph", version = "0.9.3", optional = true }
notan_draw = { path = "crates/notan_draw", version = "0.9.3", optional = true }
notan_backend = { path = "crates/notan_backend", version = "0.9.3", optional = true }
notan_egui = { path = "crates/notan_egui", version = "0.9.3", optional = true }
notan_text = { path = "crates/notan_text", version = "0.9.3", optional = true }
notan_audio = { path = "crates/notan_audio", version = "0.9.3", optional = true }
notan_extra = { path = "crates/notan_extra", version = "0.9.3", optional = true }
notan_random = { path = "crates/notan_random", version = "0.9.3", optional = true }
notan_core = { path = "crates/notan_core", version = "0.9.4" }
notan_input = { path = "crates/notan_input", version = "0.9.4" }
notan_app = { path = "crates/notan_app", version = "0.9.4" }
notan_macro = { path = "crates/notan_macro", version = "0.9.4" }
notan_math = { path = "crates/notan_math", version = "0.9.4" }
notan_graphics = { path = "crates/notan_graphics", version = "0.9.4" }
notan_utils = { path = "crates/notan_utils", version = "0.9.4" }
notan_log = { path = "crates/notan_log", version = "0.9.4", optional = true }
notan_glyph = { path = "crates/notan_glyph", version = "0.9.4", optional = true }
notan_draw = { path = "crates/notan_draw", version = "0.9.4", optional = true }
notan_backend = { path = "crates/notan_backend", version = "0.9.4", optional = true }
notan_egui = { path = "crates/notan_egui", version = "0.9.4", optional = true }
notan_text = { path = "crates/notan_text", version = "0.9.4", optional = true }
notan_audio = { path = "crates/notan_audio", version = "0.9.4", optional = true }
notan_extra = { path = "crates/notan_extra", version = "0.9.4", optional = true }
notan_random = { path = "crates/notan_random", version = "0.9.4", optional = true }

[workspace]
members = ["crates/*"]
Expand All @@ -57,6 +57,7 @@ texture_to_file = ["notan_graphics/texture_to_file"]
random = ["notan_random"]
glsl-to-spirv = ["notan_macro/glsl-to-spirv"]
shaderc = ["notan_macro/shaderc"]
serde = ["notan_app/serde", "notan_math/serde", "notan_core/serde", "notan_input/serde"]

[dev-dependencies]
egui_demo_lib = "0.20.0"
Expand Down
17 changes: 9 additions & 8 deletions crates/notan_app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notan_app"
version = "0.9.3"
version = "0.9.4"
authors = ["Nazarí González <[email protected]>"]
edition = "2021"
readme = "README.md"
Expand All @@ -14,18 +14,19 @@ description = "Provides the core API for Notan"
[dependencies]
log = "0.4.17"
hashbrown = "0.13.2"
notan_core = { path = "../notan_core", version = "0.9.3" }
notan_input = { path = "../notan_input", version = "0.9.3" }
notan_math = { path = "../notan_math", version = "0.9.3" }
notan_macro = { path = "../notan_macro", version = "0.9.3" }
notan_graphics = { path = "../notan_graphics", version = "0.9.3" }
notan_utils = { path = "../notan_utils", version = "0.9.3" }
notan_audio = { path = "../notan_audio", version = "0.9.3", optional = true }
notan_core = { path = "../notan_core", version = "0.9.4" }
notan_input = { path = "../notan_input", version = "0.9.4" }
notan_math = { path = "../notan_math", version = "0.9.4" }
notan_macro = { path = "../notan_macro", version = "0.9.4" }
notan_graphics = { path = "../notan_graphics", version = "0.9.4" }
notan_utils = { path = "../notan_utils", version = "0.9.4" }
notan_audio = { path = "../notan_audio", version = "0.9.4", optional = true }
downcast-rs = "1.2.0"
indexmap = "1.9.2"
futures = "0.3.25"
parking_lot = "0.12.1"
bytemuck = "1.13.0"
serde = { version = "1", optional = true, features = ["serde_derive"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
platter2 = "0.1.6"
Expand Down
6 changes: 6 additions & 0 deletions crates/notan_app/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ pub trait WindowBackend {
/// Returns the window's size
fn size(&self) -> (i32, i32);

/// Set the window's title
fn set_title(&mut self, title: &str);

/// Returns current windows title
fn title(&self) -> &str;

/// Returns if the window is visible
fn visible(&self) -> bool;

Expand Down
1 change: 1 addition & 0 deletions crates/notan_app/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::builder::{AppBuilder, BuildConfig};

/// Builder configuration for the window options
#[derive(Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct WindowConfig {
/// Window's title
/// `Web: no-op`
Expand Down
9 changes: 9 additions & 0 deletions crates/notan_app/src/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use notan_audio::AudioBackend;

#[derive(Default)]
pub struct EmptyWindowBackend {
title: String,
size: (i32, i32),
position: (i32, i32),
is_fullscreen: bool,
Expand Down Expand Up @@ -112,6 +113,14 @@ impl WindowBackend for EmptyWindowBackend {
fn visible(&self) -> bool {
self.visible
}

fn set_title(&mut self, title: &str) {
self.title = title.to_string();
}

fn title(&self) -> &str {
&self.title
}
}

#[derive(Default)]
Expand Down
2 changes: 1 addition & 1 deletion crates/notan_audio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notan_audio"
version = "0.9.3"
version = "0.9.4"
authors = ["Nazarí González <[email protected]>"]
edition = "2021"
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions crates/notan_backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notan_backend"
version = "0.9.3"
version = "0.9.4"
authors = ["Nazarí González <[email protected]>"]
edition = "2021"
readme = "README.md"
Expand All @@ -12,10 +12,10 @@ description = "Provides a default backend for Notan"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[target.'cfg(target_arch = "wasm32")'.dependencies]
notan_web = { path = "../notan_web", version = "0.9.3" }
notan_web = { path = "../notan_web", version = "0.9.4" }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
notan_winit = { path = "../notan_winit", version = "0.9.3" }
notan_winit = { path = "../notan_winit", version = "0.9.4" }

[features]
audio = ["notan_web/audio", "notan_winit/audio"]
Expand Down
Loading

0 comments on commit 4c2013b

Please sign in to comment.