4bb4 / implot-rs

Rust bindings to https://github.com/epezent/implot
Apache License 2.0
51 stars 22 forks source link

save as image api/ example #20

Open benmkw opened 3 years ago

benmkw commented 3 years ago

maybe by using a backend like https://github.com/imgui-rs/imgui-rs/pull/482 this crate would be nice for creating images as well (also ref https://github.com/38/plotters)

Otherwise a simple wgpu example which saves the buffer using the image crate could probably be added.

4bb4 commented 3 years ago

That sounds like a nice feature / example to have, yes. I don't have much experience with lower-level wgpu stuff though - I found something that could work in https://github.com/glium/glium/blob/master/examples/screenshot.rs for glium, but you would probably prefer to get an individual plot, not the entire imgui window, to a file.

If you have any references or wgpu code that could point me in the right direction, let me know!