Logicalshift / flo_draw

2D rendering libraries for Rust and FlowBetween
Apache License 2.0
100 stars 6 forks source link

Switching to wgpu-only backend? #10

Open ales-tsurko opened 7 months ago

ales-tsurko commented 7 months ago

Is there still a need for multiple backends, when wgpu uses all of them under the hood?

Logicalshift commented 7 months ago

Ah, yeah, the idea is definitely to get rid of the other backends. I haven't quite got around to doing that yet.

Partly, it's because the OpenGL backend is a good reference for issues with the wgpu backend, though I think that it's mostly got through the phase where that's useful now. The other issue is a weirder one: when I wrote this version of the wgpu backend, it had a lot of performance issues when running with the Vulkan backend on Windows and Linux. I think they were problems with wgpu itself and are resolved, but having the older implementation to drop back on still feels a bit reassuring.

Also I need to get FlowBetween to use the wgpu backend with the OS X frontend before I can drop Metal, it's actually not very clear how to use wgpu with an existing Swift application.

ales-tsurko commented 6 months ago

Ah, I see... For integrating WGPU with Swift check out this repo: https://github.com/jinleili/wgpu-in-app

I didn't look into it, but maybe you'll find it useful.