4bb4 / implot-rs

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

switch to imgui-wgpu simple_api #9

Closed benmkw closed 3 years ago

benmkw commented 3 years ago

ref https://github.com/Yatekii/imgui-wgpu-rs/pull/38

This is a wip PR so see if my PR to imgui-wgpu needs to be changed.

I think it would be a good idea to use the same abstraction in implot and the imgui-wpgu examples. it would further make it easier for this project if imgui-wgpu maintains this abstraction (as it can then be updated immediately when changes are made in imgui-wgpu) and its also helpful for other projects if it can be found at imgui-wgpu directly.

The way my current PR mirrors the hello_world example in imgui-wgpu should make it relatively easy to switch to the normal imgui-wgpu API if the use case becomes more complicated.

if you have any concerns please let me know :)

4bb4 commented 3 years ago

I'm a bit torn, it makes sense that the abstraction is maintained elsewhere, because implot-rs doesn't / shouldn't care about the backend details. On the other hand, I'd like it if using different backends looks reasonably similar because I consider it likely that I'll move back and forth between backends for different applications a lot, or might even want to switch between things with a feature flag.

I don't know where that leaves things, because while you guys seem to be building this abstraction in imgui-wgpu-rs, I don't know whether the same exists for the glium case, and hence I don't know what I prefer.

benmkw commented 3 years ago

Ok maybe the imgui-wgpu simple api thing will be merged anyway and then you can see if you want to use it later or not :)

4bb4 commented 3 years ago

I think I'll keep an eye on that, yes. Making the backends easily accessible is something very nice, and I think the approach I took so far of "make things look like the example in imgui-rs" is maybe not quite systematic enough :D