Skip to content

Commit

Permalink
updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jun 16, 2024
1 parent f3990d5 commit b5ab35e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
4 changes: 2 additions & 2 deletions editor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ open = "5"
rust-fuzzy-search = "0.1.1"
cargo_metadata = "0.18.1"
serde_json = "1.0.113"
image = { version = "0.24.8", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] }
imageproc = "0.23.0"
image = { version = "0.25.1", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] }
imageproc = "0.25.0"

[features]
default = ["fyrox/default"]
Expand Down
2 changes: 1 addition & 1 deletion fyrox-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rust-version = "1.72"
[dependencies]
fyrox-core-derive = { path = "../fyrox-core-derive", version = "0.23.0" }
fyrox-math = { path = "../fyrox-math", version = "0.2.0" }
base64 = "0.21.0"
base64 = "0.22.1"
byteorder = "1.4.3"
rand = "0.8.4"
memoffset = "0.9.0"
Expand Down
8 changes: 4 additions & 4 deletions fyrox-impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fyrox-animation = { path = "../fyrox-animation", version = "0.2.0" }
fyrox-graph = { path = "../fyrox-graph", version = "0.1.0" }
rapier2d = { version = "0.20", features = ["debug-render"] }
rapier3d = { version = "0.20", features = ["debug-render"] }
image = { version = "0.24.8", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] }
image = { version = "0.25.1", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] }
inflate = "0.4.5"
serde = { version = "1", features = ["derive"] }
lazy_static = "1.4.0"
Expand All @@ -41,8 +41,8 @@ strum_macros = "0.26.1"
clap = { version = "4", features = ["derive"] }
winit = { version = "0.29.2", features = ["serde"] }
half = "2.2.1"
fast_image_resize = "3.0.4"
base64 = "0.21.0"
fast_image_resize = "4.0.0"
base64 = "0.22.1"
uvgen = "0.1.0"
lightmap = "0.1.1"
libloading = "0.8.1"
Expand All @@ -51,7 +51,7 @@ gltf = { version = "1.4.0", optional = true, default-features = false, features
# These dependencies isn't actually used by the engine, but it is needed to prevent cargo from rebuilding
# the engine lib on different packages.
hashbrown = { version = "0.14.3", features = ["raw"] }
imageproc = "0.23.0"
imageproc = "0.25.0"

[features]
enable_profiler = ["fyrox-core/enable_profiler"]
Expand Down
31 changes: 18 additions & 13 deletions fyrox-impl/src/resource/texture/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use crate::{
};
use ddsfile::{Caps2, D3DFormat};
use fast_image_resize as fr;
use fast_image_resize::ResizeOptions;
use fxhash::FxHasher;
use fyrox_core::num_traits::Bounded;
use fyrox_core::sparse::AtomicIndex;
Expand All @@ -49,7 +50,6 @@ use std::{
fmt::{Debug, Display, Formatter},
hash::{Hash, Hasher},
io::Cursor,
num::NonZeroU32,
ops::{Deref, DerefMut, Shr},
path::Path,
};
Expand Down Expand Up @@ -1439,28 +1439,33 @@ impl Texture {
let src_pixel_type = convert_pixel_type_enum(src_pixel_kind);
let mut level_width = width;
let mut level_height = height;
let mut current_level = fr::Image::from_vec_u8(
NonZeroU32::new(level_width).unwrap(),
NonZeroU32::new(level_height).unwrap(),
let mut current_level = fr::images::Image::from_vec_u8(
level_width,
level_height,
dyn_img.as_bytes().to_vec(),
src_pixel_type,
)
.map_err(|_| TextureError::UnsupportedFormat)?;

while level_width != 0 && level_height != 0 {
if mip_count != 0 {
let mut dst_img = fr::Image::new(
NonZeroU32::new(level_width).unwrap(),
NonZeroU32::new(level_height).unwrap(),
src_pixel_type,
);
let mut dst_img =
fr::images::Image::new(level_width, level_height, src_pixel_type);

let mut resizer = fr::Resizer::new(fr::ResizeAlg::Convolution(
import_options.mip_filter.into_filter_type(),
));
let mut resizer = fr::Resizer::new();

resizer
.resize(&current_level.view(), &mut dst_img.view_mut())
.resize(
&current_level,
&mut dst_img,
Some(&ResizeOptions {
algorithm: fr::ResizeAlg::Convolution(
import_options.mip_filter.into_filter_type(),
),
cropping: Default::default(),
mul_div_alpha: true,
}),
)
.expect("Pixel types must match!");

current_level = dst_img;
Expand Down
2 changes: 1 addition & 1 deletion fyrox-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fyrox-graph = { path = "../fyrox-graph", version = "0.1.0" }
fyrox-animation = { path = "../fyrox-animation", version = "0.2.0"}
lazy_static = "1.4.0"
copypasta = "0.10.1"
fontdue = "0.8.0"
fontdue = "0.9.2"
notify = "6"
fxhash = "0.2.1"
strum = "0.26.1"
Expand Down

0 comments on commit b5ab35e

Please sign in to comment.