Egui vs iced in regards to game engine integration

Which gui library is more recommended for integration into game engine integration, is this iced


Or egui
(GitHub - iced-rs/iced: A cross-platform GUI library for Rust, inspired by Elm) or egui

egui from emilk - GithubHelp

The Bevy sub-ecosystem has some nice hooks for egui:

1 Like

Depends on what render backend you used, egui supports more backends(ash, vulkano, gfx, and so on), and there are even multiple implementations for one backend, while iced seems only support wgpu and glow. Notice that wgpu is not as powerful as vulkan/dx/metal for now, if you use wgpu, your game engine may not get the best performance or some new feature provided by graphic vendors.

Since you are using an im-gui in game engine, I suggest to use egui for flexibility, in case you are going to add more render backends(dx12, metal, and so on), which is pretty much the using im-gui in C++ game developments.

1 Like

Just another question, can iced be used as retained graphics since I heard it is immediate with caching?

Egui is kind of easy to figure out how to use.
I had from from negative to zero rust experience and could figure out how to get it to work.
The docs are kind of Ok, and if you download the github source, and look through the "src" in the egui_demo_app and egui_demo_lib directories, it is very understandable. I suggest egui for ease of use. Also the online web demo shows it works very fast. I was able to get up and running the "fractal clock" as a standalone app with "colors" able to run native or web.

1 Like

I don't know if iced can be used as retained, but in my experience, there's no such generic retained GUI framework for game engines, because retained GUI always need to fully control a lot of things, such as control flow and the renders, (for example QT will own the GLContext, which leave you no way to do stuffs with a context) it's nearly impossible to custom you own render logic with a retained GUI framework.

Some famous game engines do have their own retained GUI system, but as I said, it is used for their certain engine, not generic. Even Unity change their UI from immediate to retained few years ago.

Immediate technology nowadays seems only active in game developing, however it works really well in this area.

You can ask more in some game dev forums, the further discussion will be off-topic in this Rust forum.

1 Like