From 6ce78df50b724a40abe751e2afb28920ecb0a0f7 Mon Sep 17 00:00:00 2001 From: Jakob Hellermann Date: Sun, 12 Dec 2021 14:55:02 +0100 Subject: [PATCH] change sub_app to sub_app_mut --- examples/shader/custom_shader_pipelined.rs | 2 +- examples/shader/shader_defs_pipelined.rs | 2 +- pipelined/bevy_core_pipeline/src/lib.rs | 2 +- pipelined/bevy_pbr2/src/lib.rs | 2 +- pipelined/bevy_pbr2/src/render/mesh.rs | 2 +- pipelined/bevy_pbr2/src/wireframe.rs | 2 +- pipelined/bevy_render2/src/camera/mod.rs | 2 +- pipelined/bevy_render2/src/render_asset.rs | 2 +- pipelined/bevy_render2/src/render_component.rs | 4 ++-- pipelined/bevy_render2/src/texture/mod.rs | 2 +- pipelined/bevy_render2/src/view/mod.rs | 2 +- pipelined/bevy_render2/src/view/window.rs | 2 +- pipelined/bevy_sprite2/src/lib.rs | 2 +- pipelined/bevy_text2/src/lib.rs | 2 +- pipelined/bevy_ui2/src/render/mod.rs | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/shader/custom_shader_pipelined.rs b/examples/shader/custom_shader_pipelined.rs index f046b3184cb0a..a6c8addb00cdc 100644 --- a/examples/shader/custom_shader_pipelined.rs +++ b/examples/shader/custom_shader_pipelined.rs @@ -118,7 +118,7 @@ impl Plugin for CustomMaterialPlugin { app.add_asset::() .add_plugin(ExtractComponentPlugin::>::default()) .add_plugin(RenderAssetPlugin::::default()); - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .add_render_command::() .init_resource::() .init_resource::>() diff --git a/examples/shader/shader_defs_pipelined.rs b/examples/shader/shader_defs_pipelined.rs index 0856261d604ea..a2b3511fb5dad 100644 --- a/examples/shader/shader_defs_pipelined.rs +++ b/examples/shader/shader_defs_pipelined.rs @@ -25,7 +25,7 @@ pub struct IsRedPlugin; impl Plugin for IsRedPlugin { fn build(&self, app: &mut App) { app.add_plugin(ExtractComponentPlugin::::default()); - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .add_render_command::() .init_resource::() .init_resource::>() diff --git a/pipelined/bevy_core_pipeline/src/lib.rs b/pipelined/bevy_core_pipeline/src/lib.rs index bf586eebd7783..5ae6c2ce324ad 100644 --- a/pipelined/bevy_core_pipeline/src/lib.rs +++ b/pipelined/bevy_core_pipeline/src/lib.rs @@ -85,7 +85,7 @@ impl Plugin for CorePipelinePlugin { fn build(&self, app: &mut App) { app.init_resource::(); - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); render_app .init_resource::>() .init_resource::>() diff --git a/pipelined/bevy_pbr2/src/lib.rs b/pipelined/bevy_pbr2/src/lib.rs index 3e6577bb0c5fb..1d2e593d29283 100644 --- a/pipelined/bevy_pbr2/src/lib.rs +++ b/pipelined/bevy_pbr2/src/lib.rs @@ -112,7 +112,7 @@ impl Plugin for PbrPlugin { .after(VisibilitySystems::CheckVisibility), ); - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); render_app .add_system_to_stage( RenderStage::Extract, diff --git a/pipelined/bevy_pbr2/src/render/mesh.rs b/pipelined/bevy_pbr2/src/render/mesh.rs index 115b12fa5f530..82802012e3370 100644 --- a/pipelined/bevy_pbr2/src/render/mesh.rs +++ b/pipelined/bevy_pbr2/src/render/mesh.rs @@ -58,7 +58,7 @@ impl Plugin for MeshRenderPlugin { app.add_plugin(UniformComponentPlugin::::default()); - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .init_resource::() .add_system_to_stage(RenderStage::Extract, extract_meshes) .add_system_to_stage(RenderStage::Queue, queue_mesh_bind_group) diff --git a/pipelined/bevy_pbr2/src/wireframe.rs b/pipelined/bevy_pbr2/src/wireframe.rs index ee90cd21a18c7..43cb24644e855 100644 --- a/pipelined/bevy_pbr2/src/wireframe.rs +++ b/pipelined/bevy_pbr2/src/wireframe.rs @@ -31,7 +31,7 @@ impl Plugin for WireframePlugin { app.init_resource::(); - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .add_render_command::() .init_resource::() .init_resource::>() diff --git a/pipelined/bevy_render2/src/camera/mod.rs b/pipelined/bevy_render2/src/camera/mod.rs index 8629d8022d64f..d00c0773d1ee0 100644 --- a/pipelined/bevy_render2/src/camera/mod.rs +++ b/pipelined/bevy_render2/src/camera/mod.rs @@ -53,7 +53,7 @@ impl Plugin for CameraPlugin { CoreStage::PostUpdate, crate::camera::camera_system::, ); - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .init_resource::() .add_system_to_stage(RenderStage::Extract, extract_cameras); } diff --git a/pipelined/bevy_render2/src/render_asset.rs b/pipelined/bevy_render2/src/render_asset.rs index 9d9cd099fd43e..021a338a77f22 100644 --- a/pipelined/bevy_render2/src/render_asset.rs +++ b/pipelined/bevy_render2/src/render_asset.rs @@ -54,7 +54,7 @@ impl Default for RenderAssetPlugin { impl Plugin for RenderAssetPlugin { fn build(&self, app: &mut App) { - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); let prepare_asset_system = PrepareAssetSystem::::system(&mut render_app.world); render_app .init_resource::>() diff --git a/pipelined/bevy_render2/src/render_component.rs b/pipelined/bevy_render2/src/render_component.rs index 437ae2b973795..10c9d1d54b7d5 100644 --- a/pipelined/bevy_render2/src/render_component.rs +++ b/pipelined/bevy_render2/src/render_component.rs @@ -63,7 +63,7 @@ impl Default for UniformComponentPlugin { impl Plugin for UniformComponentPlugin { fn build(&self, app: &mut App) { - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .insert_resource(ComponentUniforms::::default()) .add_system_to_stage( RenderStage::Prepare, @@ -145,7 +145,7 @@ where { fn build(&self, app: &mut App) { let system = ExtractComponentSystem::::system(&mut app.world); - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); render_app.add_system_to_stage(RenderStage::Extract, system); } } diff --git a/pipelined/bevy_render2/src/texture/mod.rs b/pipelined/bevy_render2/src/texture/mod.rs index 82ca2f4128288..cb586af04e5a5 100644 --- a/pipelined/bevy_render2/src/texture/mod.rs +++ b/pipelined/bevy_render2/src/texture/mod.rs @@ -35,7 +35,7 @@ impl Plugin for ImagePlugin { .unwrap() .set_untracked(DEFAULT_IMAGE_HANDLE, Image::default()); - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .init_resource::() .add_system_to_stage(RenderStage::Cleanup, update_texture_cache_system); } diff --git a/pipelined/bevy_render2/src/view/mod.rs b/pipelined/bevy_render2/src/view/mod.rs index 2134638ed7520..9c27ca0f66890 100644 --- a/pipelined/bevy_render2/src/view/mod.rs +++ b/pipelined/bevy_render2/src/view/mod.rs @@ -27,7 +27,7 @@ impl Plugin for ViewPlugin { fn build(&self, app: &mut App) { app.init_resource::().add_plugin(VisibilityPlugin); - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .init_resource::() .add_system_to_stage(RenderStage::Extract, extract_msaa) .add_system_to_stage(RenderStage::Prepare, prepare_view_uniforms) diff --git a/pipelined/bevy_render2/src/view/window.rs b/pipelined/bevy_render2/src/view/window.rs index 6bc9dafc2a7b4..ac7ac18a2c733 100644 --- a/pipelined/bevy_render2/src/view/window.rs +++ b/pipelined/bevy_render2/src/view/window.rs @@ -24,7 +24,7 @@ pub enum WindowSystem { impl Plugin for WindowRenderPlugin { fn build(&self, app: &mut App) { - app.sub_app(RenderApp) + app.sub_app_mut(RenderApp) .init_resource::() .init_resource::() .init_resource::() diff --git a/pipelined/bevy_sprite2/src/lib.rs b/pipelined/bevy_sprite2/src/lib.rs index bc3279c9e4cd9..631938a9226a2 100644 --- a/pipelined/bevy_sprite2/src/lib.rs +++ b/pipelined/bevy_sprite2/src/lib.rs @@ -42,7 +42,7 @@ impl Plugin for SpritePlugin { let sprite_shader = Shader::from_wgsl(include_str!("render/sprite.wgsl")); shaders.set_untracked(SPRITE_SHADER_HANDLE, sprite_shader); app.add_asset::().register_type::(); - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); render_app .init_resource::() .init_resource::() diff --git a/pipelined/bevy_text2/src/lib.rs b/pipelined/bevy_text2/src/lib.rs index 5f6feb234b9b3..94bf19607ead0 100644 --- a/pipelined/bevy_text2/src/lib.rs +++ b/pipelined/bevy_text2/src/lib.rs @@ -49,7 +49,7 @@ impl Plugin for TextPlugin { .insert_resource(DefaultTextPipeline::default()) .add_system_to_stage(CoreStage::PostUpdate, text2d_system); - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); render_app.add_system_to_stage( RenderStage::Extract, extract_text2d_sprite.after(SpriteSystem::ExtractSprite), diff --git a/pipelined/bevy_ui2/src/render/mod.rs b/pipelined/bevy_ui2/src/render/mod.rs index 577a60bd9e745..c48f78b27cd61 100644 --- a/pipelined/bevy_ui2/src/render/mod.rs +++ b/pipelined/bevy_ui2/src/render/mod.rs @@ -66,7 +66,7 @@ pub fn build_ui_render(app: &mut App) { let mut active_cameras = app.world.get_resource_mut::().unwrap(); active_cameras.add(CAMERA_UI); - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); render_app .init_resource::() .init_resource::>()