r/FlutterDev • u/zxyzyxz • Jul 11 '22
Tooling NativeShell for Flutter
https://matejknopp.com/post/introducing-nativeshell/3
u/anlumo Jul 11 '22
Oh wow, I was working on something similar in my spare time, but have only invested two evenings so far.
My main problem is that the embedders use different rendering APIs on all platforms (OpenGL ES/ANGLE/DX11 on Windows, OpenGL on Linux and Metal on macOS). I want to integrate wgpu with this, but it would mean having a completely separate core application for every platform. Also, using old rendering APIs for new development feels meh when new ones are available.
Is there a chance to get Windows and Linux to use Vulkan with this? Metal on macOS is rather easy to handle, but the other two are legacy stacked on top of each other.
2
u/airflow_matt Jul 11 '22
You can not do that at embedder level. At this point if you want to significantly change the rendering you'd need to fork the engine.
I don't think the embedder API (which desktop embedders use) even supports vulkan at this point.
2
u/anlumo Jul 11 '22
No, it's implemented. The Vulkan support in the embedder is just not used by any of the official ones.
1
u/airflow_matt Jul 11 '22
Thank you. Missed that. Still, pragmatically this would require forking the embedders at very least. Linux embedder is built on Gtk3, which doesn't support vulkan. Windows embedded uses Angle. Writing full features embedder is a deceptively large task, especially when considering things like keyboard handling / IME.
2
u/anlumo Jul 11 '22
Yes, if it would have been easy I'd already have done it. That's why I'm asking.
I looked into the problem and came to the same conclusions as you, but additionally accessibility also is an issue solved by the embedders.
2
1
11
u/ren3f Jul 11 '22
This article is already a year old, but looking at the github project it receives about an update each month, so even though it is still "in a very experimental stage" I'm happy the dev didn't stop once there was a POC.