mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
73f7fd0c12
# Objective This is a follow-up to #15650. While the core `Image` stuff moved from `bevy_render` to `bevy_image`, the `ImageLoader` and the `CompressedImageSaver` remained in `bevy_render`. ## Solution I moved `ImageLoader` and `CompressedImageSaver` to `bevy_image` and re-exported everything out from `bevy_render`. The second step isn't strictly necessary, but `bevy_render` is already doing this for all the other `bevy_image` types, so I kept it the same for consistency. Unfortunately I had to give `ImageLoader` a constructor so I can keep the `RenderDevice` stuff in `bevy_render`. ## Testing It compiles! ## Migration Guide - `ImageLoader` can no longer be initialized directly through `init_asset_loader`. Now you must use `app.register_asset_loader(ImageLoader::new(supported_compressed_formats))` (check out the implementation of `bevy_render::ImagePlugin`). This only affects you if you are initializing the loader manually and does not affect users of `bevy_render::ImagePlugin`. ## Followup work - We should be able to move most of the `ImagePlugin` to `bevy_image`. This would likely require an `ImagePlugin` and a `RenderImagePlugin` or something though. |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |