bevy/examples/app
Lege19 3978ba9783
Allowed creating uninitialized images (for use as storage textures) (#17760)
# Objective
https://github.com/bevyengine/bevy/issues/17746
## Solution
- Change `Image.data` from being a `Vec<u8>` to a `Option<Vec<u8>>`
- Added functions to help with creating images
## Testing

- Did you test these changes? If so, how?
All current tests pass
Tested a variety of existing examples to make sure they don't crash
(they don't)
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
Linux x86 64-bit NixOS 
---
## Migration Guide
Code that directly access `Image` data will now need to use unwrap or
handle the case where no data is provided.
Behaviour of new_fill slightly changed, but not in a way that is likely
to affect anything. It no longer panics and will fill the whole texture
instead of leaving black pixels if the data provided is not a nice
factor of the size of the image.

---------

Co-authored-by: IceSentry <IceSentry@users.noreply.github.com>
2025-02-10 22:22:07 +00:00
..
custom_loop.rs Fix custom_loop example to include plugin finalization (#13215) 2024-05-03 20:12:27 +00:00
drag_and_drop.rs
empty_defaults.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
empty.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
headless_renderer.rs Allowed creating uninitialized images (for use as storage textures) (#17760) 2025-02-10 22:22:07 +00:00
headless.rs Remove everything except Instant from bevy_utils::time (#17158) 2025-01-05 20:36:08 +00:00
log_layers_ecs.rs Remove tracing re-export from bevy_utils (#17161) 2025-01-05 23:06:34 +00:00
log_layers.rs Remove tracing re-export from bevy_utils (#17161) 2025-01-05 23:06:34 +00:00
logs.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
no_renderer.rs Add configuration for async pipeline creation on RenderPlugin (#11847) 2024-02-16 13:35:47 +00:00
plugin_group.rs Remove second generic from .add_before, .add_after (#14285) 2024-07-15 15:58:14 +00:00
plugin.rs Remove everything except Instant from bevy_utils::time (#17158) 2025-01-05 20:36:08 +00:00
return_after_run.rs Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
thread_pool_resources.rs
without_winit.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00