diff --git a/crates/bevy_core_pipeline/src/lib.rs b/crates/bevy_core_pipeline/src/lib.rs index f55c7d2ef6b01..709c4564879c4 100644 --- a/crates/bevy_core_pipeline/src/lib.rs +++ b/crates/bevy_core_pipeline/src/lib.rs @@ -88,7 +88,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/crates/bevy_pbr/src/lib.rs b/crates/bevy_pbr/src/lib.rs index a95df2d4108a3..f2dc9e1ef868c 100644 --- a/crates/bevy_pbr/src/lib.rs +++ b/crates/bevy_pbr/src/lib.rs @@ -135,7 +135,7 @@ impl Plugin for PbrPlugin { }, ); - 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/crates/bevy_pbr/src/render/mesh.rs b/crates/bevy_pbr/src/render/mesh.rs index 42e4bb344dd57..4bb3e7dbce43b 100644 --- a/crates/bevy_pbr/src/render/mesh.rs +++ b/crates/bevy_pbr/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/crates/bevy_pbr/src/wireframe.rs b/crates/bevy_pbr/src/wireframe.rs index 2069a54b16e44..c8d88b7d764e5 100644 --- a/crates/bevy_pbr/src/wireframe.rs +++ b/crates/bevy_pbr/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/crates/bevy_render/src/camera/mod.rs b/crates/bevy_render/src/camera/mod.rs index ef1e3d19aca12..20baece4580e5 100644 --- a/crates/bevy_render/src/camera/mod.rs +++ b/crates/bevy_render/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/crates/bevy_render/src/render_asset.rs b/crates/bevy_render/src/render_asset.rs index 9d9cd099fd43e..021a338a77f22 100644 --- a/crates/bevy_render/src/render_asset.rs +++ b/crates/bevy_render/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/crates/bevy_render/src/render_component.rs b/crates/bevy_render/src/render_component.rs index 437ae2b973795..10c9d1d54b7d5 100644 --- a/crates/bevy_render/src/render_component.rs +++ b/crates/bevy_render/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/crates/bevy_render/src/texture/mod.rs b/crates/bevy_render/src/texture/mod.rs index 82ca2f4128288..cb586af04e5a5 100644 --- a/crates/bevy_render/src/texture/mod.rs +++ b/crates/bevy_render/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/crates/bevy_render/src/view/mod.rs b/crates/bevy_render/src/view/mod.rs index 7be6163f79efc..b46bd3f9d54f7 100644 --- a/crates/bevy_render/src/view/mod.rs +++ b/crates/bevy_render/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/crates/bevy_render/src/view/window.rs b/crates/bevy_render/src/view/window.rs index 6bc9dafc2a7b4..ac7ac18a2c733 100644 --- a/crates/bevy_render/src/view/window.rs +++ b/crates/bevy_render/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/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs index c9ef2cf8f54fb..3a6f266ee85e4 100644 --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -54,7 +54,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/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index 0b81909b3cec1..f245330e6821a 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/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/crates/bevy_ui/src/render/mod.rs b/crates/bevy_ui/src/render/mod.rs index e0b095416022b..5750becce95c5 100644 --- a/crates/bevy_ui/src/render/mod.rs +++ b/crates/bevy_ui/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::>() diff --git a/examples/shader/shader_defs.rs b/examples/shader/shader_defs.rs index 18014e32192d9..7cfd939f1ec2a 100644 --- a/examples/shader/shader_defs.rs +++ b/examples/shader/shader_defs.rs @@ -23,7 +23,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/examples/shader/shader_material.rs b/examples/shader/shader_material.rs index e7c4737023a71..dacc0e2dff514 100644 --- a/examples/shader/shader_material.rs +++ b/examples/shader/shader_material.rs @@ -108,7 +108,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/window/multiple_windows.rs b/examples/window/multiple_windows.rs index 3bfb07a958409..6932460a20947 100644 --- a/examples/window/multiple_windows.rs +++ b/examples/window/multiple_windows.rs @@ -18,7 +18,7 @@ fn main() { .add_startup_system(setup) .add_startup_system(create_new_window); - let render_app = app.sub_app(RenderApp); + let render_app = app.sub_app_mut(RenderApp); render_app.add_system_to_stage(RenderStage::Extract, extract_secondary_camera_phases); let mut graph = render_app.world.get_resource_mut::().unwrap(); graph.add_node(SECONDARY_PASS_DRIVER, SecondaryCameraDriver);