diff options
Diffstat (limited to 'src/nodes.rs')
-rw-r--r-- | src/nodes.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nodes.rs b/src/nodes.rs index 9791ad1..4e2ddd3 100644 --- a/src/nodes.rs +++ b/src/nodes.rs @@ -4,19 +4,19 @@ use bevy::{ render_asset::RenderAssets, render_graph::{Node, NodeRunError, RenderGraphContext, RenderLabel}, render_resource::{ImageCopyBuffer, ImageDataLayout}, - renderer::RenderContext, + renderer::RenderContext, texture::GpuImage, }, }; -use crate::render_assets::FramebufferExtractSource; +use crate::render_assets::GpuHeadlessRenderSource; #[derive(RenderLabel, Clone, PartialEq, Eq, Debug, Hash)] -pub struct FramebufferExtractLabel; +pub struct HeadlessRenderCopyLabel; #[derive(Default)] -pub struct FramebufferExtractNode; +pub struct HeadlessRenderCopyNode; -impl Node for FramebufferExtractNode { +impl Node for HeadlessRenderCopyNode { fn run( &self, _graph: &mut RenderGraphContext, @@ -24,12 +24,12 @@ impl Node for FramebufferExtractNode { world: &World, ) -> Result<(), NodeRunError> { for (_, source) in world - .resource::<RenderAssets<FramebufferExtractSource>>() + .resource::<RenderAssets<GpuHeadlessRenderSource>>() .iter() { let Some(gpu_image) = world - .resource::<RenderAssets<Image>>() - .get(&source.source_handle) + .resource::<RenderAssets<GpuImage>>() + .get(source.source_handle.id()) else { return Ok(()); }; |