File tree 1 file changed +21
-0
lines changed
crates/bevy_render/src/render_graph 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ pub trait RenderGraphApp {
19
19
sub_graph_name : & ' static str ,
20
20
edges : & [ & ' static str ] ,
21
21
) -> & mut Self ;
22
+ /// Add node edge to the specified graph
23
+ fn add_render_graph_edge (
24
+ & mut self ,
25
+ sub_graph_name : & ' static str ,
26
+ output_edge : & ' static str ,
27
+ input_edge : & ' static str ,
28
+ ) -> & mut Self ;
22
29
}
23
30
24
31
impl RenderGraphApp for App {
@@ -49,4 +56,18 @@ impl RenderGraphApp for App {
49
56
graph. add_node_edges ( edges) ;
50
57
self
51
58
}
59
+
60
+ fn add_render_graph_edge (
61
+ & mut self ,
62
+ sub_graph_name : & ' static str ,
63
+ output_edge : & ' static str ,
64
+ input_edge : & ' static str ,
65
+ ) -> & mut Self {
66
+ let mut render_graph = self . world . get_resource_mut :: < RenderGraph > ( ) . expect (
67
+ "RenderGraph not found. Make sure you are using add_render_graph_node on the RenderApp" ,
68
+ ) ;
69
+ let graph = render_graph. sub_graph_mut ( sub_graph_name) ;
70
+ graph. add_node_edge ( output_edge, input_edge) ;
71
+ self
72
+ }
52
73
}
You can’t perform that action at this time.
0 commit comments