2
0
Fork 0
mirror of https://github.com/bevyengine/bevy synced 2025-01-11 20:59:04 +00:00
bevy/crates/bevy_render/macros
Robert Swain ab7cbfa8fc
Consolidate Render(Ui)Materials(2d) into RenderAssets ()
# Objective

- Replace `RenderMaterials` / `RenderMaterials2d` / `RenderUiMaterials`
with `RenderAssets` to enable implementing changes to one thing,
`RenderAssets`, that applies to all use cases rather than duplicating
changes everywhere for multiple things that should be one thing.
- Adopts  

## Solution

- Make RenderAsset generic over the destination type rather than the
source type as in 
- Use `RenderAssets<PreparedMaterial<M>>` etc for render materials

---

## Changelog

- Changed:
- The `RenderAsset` trait is now implemented on the destination type.
Its `SourceAsset` associated type refers to the type of the source
asset.
- `RenderMaterials`, `RenderMaterials2d`, and `RenderUiMaterials` have
been replaced by `RenderAssets<PreparedMaterial<M>>` and similar.

## Migration Guide

- `RenderAsset` is now implemented for the destination type rather that
the source asset type. The source asset type is now the `RenderAsset`
trait's `SourceAsset` associated type.
2024-04-09 13:26:34 +00:00
..
src Consolidate Render(Ui)Materials(2d) into RenderAssets () 2024-04-09 13:26:34 +00:00
Cargo.toml Make feature(doc_auto_cfg) work () 2024-03-23 02:22:52 +00:00