Move initializing the ScreenshotToScreenPipeline
to the ScreenshotPlugin
. (#18524)
# Objective - Minor cleanup. - This seems to have been introduced in #8336. There is no discussion about it I can see, there's no comment explaining why this is here and not in `ScreenshotPlugin`. This seems to have just been misplaced. ## Solution - Move this to the ScreenshotPlugin! ## Testing - The screenshot example still works at least on desktop.
This commit is contained in:
parent
f6543502b4
commit
798e1c5498
@ -21,7 +21,7 @@ use wgpu::{
|
||||
|
||||
pub mod screenshot;
|
||||
|
||||
use screenshot::{ScreenshotPlugin, ScreenshotToScreenPipeline};
|
||||
use screenshot::ScreenshotPlugin;
|
||||
|
||||
pub struct WindowRenderPlugin;
|
||||
|
||||
@ -43,12 +43,6 @@ impl Plugin for WindowRenderPlugin {
|
||||
.add_systems(Render, prepare_windows.in_set(RenderSet::ManageViews));
|
||||
}
|
||||
}
|
||||
|
||||
fn finish(&self, app: &mut App) {
|
||||
if let Some(render_app) = app.get_sub_app_mut(RenderApp) {
|
||||
render_app.init_resource::<ScreenshotToScreenPipeline>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ExtractedWindow {
|
||||
|
@ -425,6 +425,7 @@ impl Plugin for ScreenshotPlugin {
|
||||
.init_resource::<RenderScreenshotTargets>()
|
||||
.init_resource::<RenderScreenshotsPrepared>()
|
||||
.init_resource::<SpecializedRenderPipelines<ScreenshotToScreenPipeline>>()
|
||||
.init_resource::<ScreenshotToScreenPipeline>()
|
||||
.add_systems(ExtractSchedule, extract_screenshots.ambiguous_with_all())
|
||||
.add_systems(
|
||||
Render,
|
||||
|
Loading…
Reference in New Issue
Block a user