Re:Advice for the next 100 Rust GUIs
by swiftcoder on Sunday November 22, 2026 @04:13AM
(#50597705)
> especially if the 3D canvas uses a different rendering API than the UI framework itself
See this is high on the list of things I do not want. I don't want my UI rendered from scratch in OpenGL, I want it drawn using the native widget API, which already supports embedding 3D canvases.
This is one of those things that is completely trivial in, say, Cocoa, but arbitrarily hard in most cross-platform UI toolkits.
Sure, but that's just because Apple already did the work, and they only have to support Metal and to a limited extent OpenGL anyway.
On a Windows desktop, you have D3D11 and below, D3D12, Vulkan, and OpenGL. I believe you can do most of it if you're using GDI, but even Microsoft's own myriad of UI frameworks have spotty support.
Re:Advice for the next 100 Rust GUIs
by speedstyle on Sunday November 22, 2026 @08:58AM
(#50599778)
Windows users do not want you to use the system API (most preinstalled apps don't) and Linux users don't have one.
For example, say your UI is drawn with OpenGL, but you need an embedded Vulkan canvas. This takes a huge amount of API-specific code passing API-foreign texture handles and synchronization objects between contexts. You need to do this for every possible combination of APIs, and it's not symmetrical (hosting Vulkan within OpenGL is different from hosting OpenGL within Vulkan).
Every desktop-class rendering API does have extensions for dealing with foreign APIs, but it's a lot of work, to the point where rendering into shared memory from a subprocess is sometimes the most viable option.