bevy/crates/bevy_gltf/src
66OJ66 5b0e6a5321
Fix panic whilst loading UASTC encoded ktx2 textures (#9158)
# Objective

Fixes #9121

Context:
- `ImageTextureLoader` depends on `RenderDevice` to work out which
compressed image formats it can support
- `RenderDevice` is initialised by `RenderPlugin`
- https://github.com/bevyengine/bevy/pull/8336 made `RenderPlugin`
initialisation async
- This caused `RenderDevice` to be missing at the time of
`ImageTextureLoader` initialisation, which in turn meant UASTC encoded
ktx2 textures were being converted to unsupported formats, and thus
caused panics

## Solution

- Delay `ImageTextureLoader` initialisation

---

## Changelog

- Moved `ImageTextureLoader` initialisation from `ImagePlugin::build()`
to `ImagePlugin::finish()`
- Default to `CompressedImageFormats::NONE` if `RenderDevice` resource
is missing

---------

Co-authored-by: 66OJ66 <hi0obxud@anonaddy.me>
2023-07-23 01:27:37 +00:00
..
lib.rs Fix panic whilst loading UASTC encoded ktx2 textures (#9158) 2023-07-23 01:27:37 +00:00
loader.rs Add GltfLoader::new. (#9120) 2023-07-13 23:54:59 +00:00
vertex_attributes.rs Add support for custom glTF vertex attributes. (#5370) 2023-04-24 14:20:13 +00:00