Make render target more consumable.
StarArawn opened this issue · comments
Mostly we use the RenderTarget
stuff for probes and it's use is very internal to the engine, however I can see the use case for needing to expose it more. A possible API for that might be:
let render_target = RenderTarget:new(.....)
pipeline_manager.set_target(render_target);
app.render_now();
pipeline_manager.reset_target();
Or in the case of custom rendering:
let mut render_schedule =
Schedule::builder()
.add_system(crate::systems::MySystem::create())
.flush()
.add_thread_local_fn(harmony::graphics::systems::render::create())
.build();
let render_target = RenderTarget:new(....)
pipeline_manager.set_target(render_target);
render_schedule.execute(...);
pipeline_manager.reset_target();