If I were to start a new project today, I’d look at this library: https://platform.uno/
Can’t say I like all technical decision they made. I would prefer them to use a purposely-built GPU-centric renderer instead of Skia, it’s not terribly complex, here’s a proof of concept: https://github.com/const-me/Vrmac/#2d-graphics Still, Skia is not _that_ bad, maybe it’s fine there.
An irritating thing about Uno is that I heard about it for the first time in this thread, and I'm finding it basically impossible to figure out how well it meets the requirement of this thread: cross-platform GUI.
Their main page says that it's cross-platform, but doesn't have any screenshots of a simple application running on every platform. If you go to [1] you'll see that most of the programs they feature are Android + iOS only, not even desktop platforms. Of the few that do, most seem to be Windows only, and a few run on the Mac, but look horrific on that platform. [2] Not a single one of their showcase programs runs on Linux. What's up with this, shouldn't the whole point of a showcase for a cross-platform UI framework be to show off applications that run on every supported platform?
If you start digging into the docs [3], you immediately find pages that mention only iOS, Android, UWP, and WebAssembly as supported platforms. The "developers" dropdown on the main page has Android, iOS, Web, macOS and Windows 7?? Even their code samples [4], hilariously, only run on a few platforms and don't seem to link to any actual code?
I do a lot of app dev and recently looked into Uno to see what it was because I was also confused.
Uno is sort of an alternative to Xamarin.Forms aimed at windows developers that aren't happy that Xamarin.Forms uses a non-standard XAML. Uno uses UWP XAML, which is preferred by these users.
The way I like to think of the two frameworks is that Uno is a cross-platform framework that aims to align systems to the Windows way of doing things, while Xamarin.Forms is more of a "do iOS/Android" in same codebase and just happens to also support windows. There is unique value props in each framework (e.g. Uno also targets WASM and Xamarin.Forms targets Samsung Tizen).
There is an entire movement of Skia-based renderers now that Flutter has shown it possible. I'm not a fan of that approach because I don't think its _practical_ long term, but I think its theoretically the best way to do things. Otherwise, I argue that UI should be native and everything else is shared business logic between platforms.
> I think its theoretically the best way to do things
I think a GPU-targeted equivalent of Skia is going to be better on modern hardware. And will continue to become better on future hardware because GPUs improve faster than CPUs, even on mobile: Pi4 can do about 10 GFlops on CPU, 32 Gflop on GPU.
Skia was designed at the time when vector graphics was expected to be rasterized on CPU. People have managed to implement GLES backend, but I don’t think it’s efficient. A purposely-built GPU-centric library can do better.
Microsoft did better when they made Direct2D and DirectWrite, these two make the rendering backend of UWP GUI framework. There‘s 1 disadvantage of that platform but it’s a huge one: it only works on top of Direct3D 11 and therefore Windows only.
Wasn’t always the case, but by now we already have decent 3D GPU support on all platforms, both hardware and software. Even the web can now do that with WebGL. However, no one so far made a cross platform equivalent of Direct2D and DirectWrite.
If you click on the link in my parent comment, you’ll see a proof of concept how it can be done. It even includes a component to play h264 video with hardware decoder. That was an unpaid hobby project so there’re large missing pieces (the largest of them are missing text support when using Direct2D backend, and no gradient or image brushes in my custom 2D backend), but both are doable, I just neglected.
That library is built on top of .NET Core 2.1 (I didn’t want to use C++ more than necessary), works on Windows with Direct3D 12, and on Raspberry Pi4 on top of GLES 3.0. The GPU abstraction library I’ve picked supports all of them except WebGL, supporting iOS, Android and OSX should be straightforward: http://diligentgraphics.com/diligent-engine/
I think I misunderstood your initial comment and we probably mostly agree : )
When I think 'Skia-based', I am thinking of a "canvas-based" renderer as opposed to native views. So I would group Skia and your option together in my mind.
Can’t say I like all technical decision they made. I would prefer them to use a purposely-built GPU-centric renderer instead of Skia, it’s not terribly complex, here’s a proof of concept: https://github.com/const-me/Vrmac/#2d-graphics Still, Skia is not _that_ bad, maybe it’s fine there.