mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
15440c189b
# Objective Fixes #15730. ## Solution As part of #15586, we made a constant to store all the supported image formats. However since the `ImageFormat` does actually include Hdr and OpenExr, it also included the `"hdr"` and `"exr"` file extensions. These are supported by separate loaders though: `HdrTextureLoader` and `ExrTextureLoader`. This led to a warning about duplicate asset loaders. Therefore, instead of having the constant for `ImageFormat`, I made the constant just for `ImageLoader`. This lets us correctly remove `"hdr"` and `"exr"` from the image formats supported by `ImageLoader`, returning us to having a single asset loader for every image format. Note: we could have just removed `hdr` and `exr` from `ImageFormat::SUPPORTED_FILE_EXTENSIONS`, but this would be very confusing. Then the list of `ImageFormat`s would not match the list of supported formats! ## Testing - I ran the `sprite` example and got no warning! I also replaced the sprite in that example with an HDR file and everything worked as expected. |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |