mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
bc88f33e48
This is a duplicate of #9632, it was created since I forgot to make a new branch when I first made this PR, so I was having trouble resolving merge conflicts, meaning I had to rebuild my PR. # Objective - Allow other plugins to create the renderer resources. An example of where this would be required is my [OpenXR plugin](https://github.com/awtterpip/bevy_openxr) ## Solution - Changed the bevy RenderPlugin to optionally take precreated render resources instead of a configuration. ## Migration Guide The `RenderPlugin` now takes a `RenderCreation` enum instead of `WgpuSettings`. `RenderSettings::default()` returns `RenderSettings::Automatic(WgpuSettings::default())`. `RenderSettings` also implements `From<WgpuSettings>`. ```rust // before RenderPlugin { wgpu_settings: WgpuSettings { ... }, } // now RenderPlugin { render_creation: RenderCreation::Automatic(WgpuSettings { ... }), } // or RenderPlugin { render_creation: WgpuSettings { ... }.into(), } ``` --------- Co-authored-by: Malek <pocmalek@gmail.com> Co-authored-by: Robert Swain <robert.swain@gmail.com> |
||
---|---|---|
.. | ||
custom_loop.rs | ||
drag_and_drop.rs | ||
empty.rs | ||
empty_defaults.rs | ||
headless.rs | ||
logs.rs | ||
no_renderer.rs | ||
plugin.rs | ||
plugin_group.rs | ||
return_after_run.rs | ||
thread_pool_resources.rs | ||
without_winit.rs |