Skip to content
This repository has been archived by the owner on Aug 22, 2020. It is now read-only.

Make render target more consumable. #49

Open
StarArawn opened this issue May 21, 2020 · 0 comments
Open

Make render target more consumable. #49

StarArawn opened this issue May 21, 2020 · 0 comments

Comments

@StarArawn
Copy link
Owner

StarArawn commented May 21, 2020

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();
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant