Re:Moxie: Incremental Declarative UI in Rust
by FraKtus on Monday December 02, 2019 @03:29PM
(#21686528)
With imGui you must fully describe your interface at each frame. Because it's fully GPU accelerated it does not cost that much and run very fluently at 60 FPS.
[ Parent
| on HN ]
Re:Moxie: Incremental Declarative UI in Rust
by kaoD on Tuesday December 03, 2019 @04:05AM
(#21690956)
> it does not cost that much and run very fluently at 60 FPS
But it drains your battery like crazy. Immediate mode GUIs are good for games, which already render the whole scene @60FPS and are expected to be costly, but re-rendering your whole window every frame even when idling is just a waste of power.
Re:Moxie: Incremental Declarative UI in Rust
by ocornut on Monday December 09, 2019 @02:41PM
(#21745681)
As mentioned the cost is negligible when you already have a animated 3D scene with the case for games.
For non-game (desktopey) app, well, there's no reason to render at 60 FPS you should only render on user interaction otherwise go idle most of the time....
Re:Moxie: Incremental Declarative UI in Rust
by hellofunk on Monday December 02, 2019 @04:13PM
(#21687011)
The rendering is on the GPU but the description of the UI is created and executed on the CPU, and then the results are sent to the GPU, is that right? In other words, it works a little like a video game.
Re:Moxie: Incremental Declarative UI in Rust
by FraKtus on Monday December 02, 2019 @05:14PM
(#21687629)
Yes, you describe your UI from the CPU code and it gets accumulated into a draw list. Differents backends (OpenGL, Direct X, Metal ...) sends them to the GPU for display. It's close to what a game is doing.