Expose bevy_image as a feature (#16948)

# Objective

- Fixes #16563 
- Make sure bevy_image is available when needed

## Solution

- Add a new feature for `bevy_image`
- Also enable the `bevy_image` feature in `bevy_internal` for all
features that use `bevy_image` themselves
This commit is contained in:
François Mockers 2024-12-24 04:11:01 +01:00 committed by GitHub
parent 35e0b5be00
commit 6577f5d26a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 3 deletions

View File

@ -235,6 +235,9 @@ bevy_window = ["bevy_internal/bevy_window"]
# winit window and input backend
bevy_winit = ["bevy_internal/bevy_winit"]
# Load and access image data. Usually added by an image format
bevy_image = ["bevy_internal/bevy_image"]
# Adds support for rendering gizmos
bevy_gizmos = ["bevy_internal/bevy_gizmos", "bevy_color"]

View File

@ -159,9 +159,14 @@ bevy_ci_testing = ["bevy_dev_tools/bevy_ci_testing", "bevy_render?/ci_limits"]
# Enable animation support, and glTF animation loading
animation = ["bevy_animation", "bevy_gltf?/bevy_animation"]
bevy_sprite = ["dep:bevy_sprite", "bevy_gizmos?/bevy_sprite"]
bevy_pbr = ["dep:bevy_pbr", "bevy_gizmos?/bevy_pbr"]
bevy_sprite = ["dep:bevy_sprite", "bevy_gizmos?/bevy_sprite", "bevy_image"]
bevy_pbr = ["dep:bevy_pbr", "bevy_gizmos?/bevy_pbr", "bevy_image"]
bevy_window = ["dep:bevy_window", "dep:bevy_a11y"]
bevy_core_pipeline = ["dep:bevy_core_pipeline", "bevy_image"]
bevy_gizmos = ["dep:bevy_gizmos", "bevy_image"]
bevy_gltf = ["dep:bevy_gltf", "bevy_image"]
bevy_ui = ["dep:bevy_ui", "bevy_image"]
bevy_image = ["dep:bevy_image"]
# Used to disable code that is unsupported when Bevy is dynamically linked
dynamic_linking = ["bevy_diagnostic/dynamic_linking"]
@ -173,12 +178,13 @@ android_shared_stdcxx = ["bevy_audio/android_shared_stdcxx"]
# screen readers and forks.)
accesskit_unix = ["bevy_winit/accesskit_unix"]
bevy_text = ["dep:bevy_text"]
bevy_text = ["dep:bevy_text", "bevy_image"]
bevy_render = [
"dep:bevy_render",
"bevy_scene?/bevy_render",
"bevy_gizmos?/bevy_render",
"bevy_image",
]
# Enable assertions to check the validity of parameters passed to glam

View File

@ -61,6 +61,7 @@ The default feature set enables most of the expected features of a game engine,
|bevy_ci_testing|Enable systems that allow for automated testing on CI|
|bevy_debug_stepping|Enable stepping-based debugging of Bevy systems|
|bevy_dev_tools|Provides a collection of developer tools|
|bevy_image|Load and access image data. Usually added by an image format|
|bevy_remote|Enable the Bevy Remote Protocol|
|bevy_ui_debug|Provides a debug overlay for bevy UI|
|bmp|BMP image format support|