aboutsummaryrefslogtreecommitdiff
path: root/src/nodes.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2024-06-03 21:39:43 -0400
committerLibravatar Silas Bartha <silas@exvacuum.dev>2024-06-03 21:39:43 -0400
commitef6c2954156b2b0cf4abfe583d8faaf546f4e7c4 (patch)
treef5da21c83771023d55036ad94ee52d8db992ffbd /src/nodes.rs
parent0ac133c0c396c8b75892cb6e43a52ad973046e2d (diff)
Removed toolchain config
Diffstat (limited to 'src/nodes.rs')
-rw-r--r--src/nodes.rs22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/nodes.rs b/src/nodes.rs
index d069798..9791ad1 100644
--- a/src/nodes.rs
+++ b/src/nodes.rs
@@ -1,4 +1,12 @@
-use bevy::{prelude::*, render::{render_graph::{Node, RenderGraphContext, NodeRunError, RenderLabel}, renderer::RenderContext, render_asset::RenderAssets, render_resource::{ImageCopyBuffer, ImageDataLayout}}};
+use bevy::{
+ prelude::*,
+ render::{
+ render_asset::RenderAssets,
+ render_graph::{Node, NodeRunError, RenderGraphContext, RenderLabel},
+ render_resource::{ImageCopyBuffer, ImageDataLayout},
+ renderer::RenderContext,
+ },
+};
use crate::render_assets::FramebufferExtractSource;
@@ -15,9 +23,15 @@ impl Node for FramebufferExtractNode {
render_context: &mut RenderContext,
world: &World,
) -> Result<(), NodeRunError> {
- for (_, source) in world.resource::<RenderAssets<FramebufferExtractSource>>().iter() {
- let Some(gpu_image) = world.resource::<RenderAssets<Image>>().get(&source.source_handle) else {
- return Ok(())
+ for (_, source) in world
+ .resource::<RenderAssets<FramebufferExtractSource>>()
+ .iter()
+ {
+ let Some(gpu_image) = world
+ .resource::<RenderAssets<Image>>()
+ .get(&source.source_handle)
+ else {
+ return Ok(());
};
render_context.command_encoder().copy_texture_to_buffer(