bevy/examples/shader
Robert Swain a0a3d8798b ExtractResourcePlugin (#3745)
# Objective

- Add an `ExtractResourcePlugin` for convenience and consistency

## Solution

- Add an `ExtractResourcePlugin` similar to `ExtractComponentPlugin` but for ECS `Resource`s. The system that is executed simply clones the main world resource into a render world resource, if and only if the main world resource was either added or changed since the last execution of the system.
- Add an `ExtractResource` trait with a `fn extract_resource(res: &Self) -> Self` function. This is used by the `ExtractResourcePlugin` to extract the resource
- Add a derive macro for `ExtractResource` on a `Resource` with the `Clone` trait, that simply returns `res.clone()`
- Use `ExtractResourcePlugin` wherever both possible and appropriate
2022-05-30 18:36:03 +00:00
..
animate_shader.rs shader examples wording coherence (#4810) 2022-05-30 15:57:25 +00:00
compute_shader_game_of_life.rs ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
custom_vertex_attribute.rs shader examples wording coherence (#4810) 2022-05-30 15:57:25 +00:00
shader_defs.rs ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
shader_instancing.rs ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
shader_material.rs shader examples wording coherence (#4810) 2022-05-30 15:57:25 +00:00
shader_material_glsl.rs shader examples wording coherence (#4810) 2022-05-30 15:57:25 +00:00
shader_material_screenspace_texture.rs shader examples wording coherence (#4810) 2022-05-30 15:57:25 +00:00