bevy/crates/bevy_render/src
François 5622d56be1 Use plugin setup for resource only used at setup time (#6360)
# Objective

- Build on #6336 for more plugin configurations

## Solution

- `LogSettings`, `ImageSettings` and `DefaultTaskPoolOptions` are now plugins settings rather than resources

---

## Changelog

- `LogSettings` plugin settings have been move to `LogPlugin`, `ImageSettings` to `ImagePlugin` and `DefaultTaskPoolOptions` to `CorePlugin`

## Migration Guide

The `LogSettings` settings have been moved from a resource to `LogPlugin` configuration:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(LogSettings {
    level: Level::DEBUG,
    filter: "wgpu=error,bevy_render=info,bevy_ecs=trace".to_string(),
  })
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(LogPlugin {
    level: Level::DEBUG,
    filter: "wgpu=error,bevy_render=info,bevy_ecs=trace".to_string(),
}))
```


The `ImageSettings` settings have been moved from a resource to `ImagePlugin` configuration:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(ImageSettings::default_nearest())
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
```


The `DefaultTaskPoolOptions` settings have been moved from a resource to `CorePlugin::task_pool_options`:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(DefaultTaskPoolOptions::with_num_threads(4))
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(CorePlugin {
  task_pool_options: TaskPoolOptions::with_num_threads(4),
}))
```
2022-10-25 22:19:34 +00:00
..
camera doc: document PerspectiveProjection (#6310) 2022-10-24 14:53:14 +00:00
color Correctly use as_hsla_f32 in Add<Color> and AddAssign<Color>, fixes #5543 (#5546) 2022-08-17 14:00:10 +00:00
mesh add Debug, Copy, Clone derives to Circle (#6009) 2022-09-18 02:03:10 +00:00
primitives Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_graph fix: grammar and typo fixes in rendergraph docs (#5710) 2022-08-16 20:46:46 +00:00
render_phase remove copyless (#6100) 2022-09-27 18:11:40 +00:00
render_resource log pipeline cache errors earlier (#6115) 2022-09-28 04:04:55 +00:00
renderer Link to linux_dependencies.md in the panic message when failing to detect a GPU (#6261) 2022-10-17 14:01:52 +00:00
texture Use plugin setup for resource only used at setup time (#6360) 2022-10-25 22:19:34 +00:00
view Avoid creating SurfaceConfiguration in prepare_windows (#6255) 2022-10-24 15:38:51 +00:00
extract_component.rs Implement IntoIterator for &Extract<P> (#6025) 2022-09-20 00:29:10 +00:00
extract_param.rs Exclusive Systems Now Implement System. Flexible Exclusive System Params (#6083) 2022-09-26 23:57:07 +00:00
extract_resource.rs remove an unused import in release (#5320) 2022-07-14 23:43:57 +00:00
globals.rs Add global time scaling (#5752) 2022-10-22 18:52:29 +00:00
lib.rs Use plugin setup for resource only used at setup time (#6360) 2022-10-25 22:19:34 +00:00
rangefinder.rs Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_asset.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00
settings.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00
spatial_bundle.rs Add associated constant IDENTITY to Transform and friends. (#5340) 2022-08-30 22:10:24 +00:00