Skip to content

Commit

Permalink
change sub_app to sub_app_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Dec 21, 2021
1 parent 00c6ac4 commit 53c151f
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_core_pipeline/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl Plugin for CorePipelinePlugin {
fn build(&self, app: &mut App) {
app.init_resource::<ClearColor>();

let render_app = app.sub_app(RenderApp);
let render_app = app.sub_app_mut(RenderApp);
render_app
.init_resource::<DrawFunctions<Transparent2d>>()
.init_resource::<DrawFunctions<Opaque3d>>()
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/render/mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Plugin for MeshRenderPlugin {

app.add_plugin(UniformComponentPlugin::<MeshUniform>::default());

app.sub_app(RenderApp)
app.sub_app_mut(RenderApp)
.init_resource::<MeshPipeline>()
.add_system_to_stage(RenderStage::Extract, extract_meshes)
.add_system_to_stage(RenderStage::Queue, queue_mesh_bind_group)
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/wireframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Plugin for WireframePlugin {

app.init_resource::<WireframeConfig>();

app.sub_app(RenderApp)
app.sub_app_mut(RenderApp)
.add_render_command::<Opaque3d, DrawWireframes>()
.init_resource::<WireframePipeline>()
.init_resource::<SpecializedPipelines<WireframePipeline>>()
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/camera/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Plugin for CameraPlugin {
CoreStage::PostUpdate,
crate::camera::camera_system::<PerspectiveProjection>,
);
app.sub_app(RenderApp)
app.sub_app_mut(RenderApp)
.init_resource::<ExtractedCameraNames>()
.add_system_to_stage(RenderStage::Extract, extract_cameras);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/render_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<A: RenderAsset> Default for RenderAssetPlugin<A> {

impl<A: RenderAsset> Plugin for RenderAssetPlugin<A> {
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::<A>::system(&mut render_app.world);
render_app
.init_resource::<ExtractedAssets<A>>()
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_render/src/render_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<C> Default for UniformComponentPlugin<C> {

impl<C: Component + AsStd140 + Clone> Plugin for UniformComponentPlugin<C> {
fn build(&self, app: &mut App) {
app.sub_app(RenderApp)
app.sub_app_mut(RenderApp)
.insert_resource(ComponentUniforms::<C>::default())
.add_system_to_stage(
RenderStage::Prepare,
Expand Down Expand Up @@ -145,7 +145,7 @@ where
{
fn build(&self, app: &mut App) {
let system = ExtractComponentSystem::<C>::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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/texture/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<TextureCache>()
.add_system_to_stage(RenderStage::Cleanup, update_texture_cache_system);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Plugin for ViewPlugin {
fn build(&self, app: &mut App) {
app.init_resource::<Msaa>().add_plugin(VisibilityPlugin);

app.sub_app(RenderApp)
app.sub_app_mut(RenderApp)
.init_resource::<ViewUniforms>()
.add_system_to_stage(RenderStage::Extract, extract_msaa)
.add_system_to_stage(RenderStage::Prepare, prepare_view_uniforms)
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/view/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<ExtractedWindows>()
.init_resource::<WindowSurfaces>()
.init_resource::<NonSendMarker>()
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_sprite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<TextureAtlas>().register_type::<Sprite>();
let render_app = app.sub_app(RenderApp);
let render_app = app.sub_app_mut(RenderApp);
render_app
.init_resource::<ImageBindGroups>()
.init_resource::<SpritePipeline>()
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_text/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ui/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub fn build_ui_render(app: &mut App) {
let mut active_cameras = app.world.get_resource_mut::<ActiveCameras>().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::<UiPipeline>()
.init_resource::<SpecializedPipelines<UiPipeline>>()
Expand Down
2 changes: 1 addition & 1 deletion examples/shader/shader_defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct IsRedPlugin;
impl Plugin for IsRedPlugin {
fn build(&self, app: &mut App) {
app.add_plugin(ExtractComponentPlugin::<IsRed>::default());
app.sub_app(RenderApp)
app.sub_app_mut(RenderApp)
.add_render_command::<Transparent3d, DrawIsRed>()
.init_resource::<IsRedPipeline>()
.init_resource::<SpecializedPipelines<IsRedPipeline>>()
Expand Down
2 changes: 1 addition & 1 deletion examples/shader/shader_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Plugin for CustomMaterialPlugin {
app.add_asset::<CustomMaterial>()
.add_plugin(ExtractComponentPlugin::<Handle<CustomMaterial>>::default())
.add_plugin(RenderAssetPlugin::<CustomMaterial>::default());
app.sub_app(RenderApp)
app.sub_app_mut(RenderApp)
.add_render_command::<Transparent3d, DrawCustom>()
.init_resource::<CustomPipeline>()
.init_resource::<SpecializedPipelines<CustomPipeline>>()
Expand Down
2 changes: 1 addition & 1 deletion examples/window/multiple_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<RenderGraph>().unwrap();
graph.add_node(SECONDARY_PASS_DRIVER, SecondaryCameraDriver);
Expand Down

0 comments on commit 53c151f

Please sign in to comment.