bevy/crates/bevy_render/src/texture
Edgar Geier f18f28874a
Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097)
# Objective

- Better consistency with `add_systems`.
- Deprecating `add_plugin` in favor of a more powerful `add_plugins`.
- Allow passing `Plugin` to `add_plugins`.
- Allow passing tuples to `add_plugins`.

## Solution

- `App::add_plugins` now takes an `impl Plugins` parameter.
- `App::add_plugin` is deprecated.
- `Plugins` is a new sealed trait that is only implemented for `Plugin`,
`PluginGroup` and tuples over `Plugins`.
- All examples, benchmarks and tests are changed to use `add_plugins`,
using tuples where appropriate.

---

## Changelog

### Changed

- `App::add_plugins` now accepts all types that implement `Plugins`,
which is implemented for:
  - Types that implement `Plugin`.
  - Types that implement `PluginGroup`.
  - Tuples (up to 16 elements) over types that implement `Plugins`.
- Deprecated `App::add_plugin` in favor of `App::add_plugins`.

## Migration Guide

- Replace `app.add_plugin(plugin)` calls with `app.add_plugins(plugin)`.

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2023-06-21 20:51:03 +00:00
..
basis.rs Fix beta clippy lints (#7154) 2023-01-11 09:51:22 +00:00
dds.rs Updated to wgpu 0.16.0, wgpu-hal 0.16.0 and naga 0.12.0 (#8446) 2023-04-26 15:34:23 +00:00
exr_texture_loader.rs Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00
fallback_image.rs Expand FallbackImage to include a GpuImage for each possible TextureViewDimension (#6974) 2023-06-19 22:56:25 +00:00
hdr_texture_loader.rs update image to 0.24 (#4121) 2022-05-28 02:00:55 +00:00
image.rs update bitflags to 2.3 (#8728) 2023-06-01 08:41:42 +00:00
image_texture_conversion.rs Fix screenshots on Wayland + Nvidia (#8701) 2023-05-29 07:22:13 +00:00
image_texture_loader.rs Add support for pnm textures (#8601) 2023-05-16 23:51:47 +00:00
ktx2.rs Update ruzstd and basis universal (#8622) 2023-05-17 23:29:31 +00:00
mod.rs Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
texture_cache.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00