News for hackers. Stuff that matters.
Re:Leveraging Rust and the GPU to render user interfaces at ... by rob74 on Thursday March 09, 2023 @03:59AM (#35079479)
Maybe you need to add an "(in Rust)" to all these sentences? Sure there are C++ frameworks, but they probably wanted a pure Rust UI framework?

My 2 cents: it's nice to have smooth rendering in your editor, but I'm currently mostly using a Java-based IDE (IDEA family), and it's responsive enough for my taste. If I were to use the current prototype of their editor, I'm afraid the usage of fixed-width fonts all over the place (which I assume can be fixed, but may also be due to constraints of the UI framework?) would probably bother me more than the 120 FPS UI would impress me (assuming that I had a monitor that was fast enough, which I don't). On the plus side, it sounds like they support sub-pixel rendering - if that's the case, kudos to them!

Re:Leveraging Rust and the GPU to render user interfaces at ... by DeathArrow on Thursday March 09, 2023 @05:17AM (#35079878)
Not true, even if you add Rust. egui was released earlier: https://github.com/emilk/egui

And egui isn't tied to Apple proprietary frameworks.

Re:Leveraging Rust and the GPU to render user interfaces at ... by littlestymaar on Thursday March 09, 2023 @05:25AM (#35079918)
Afaik egui isn't doing any kind of the fancy GPU based 2D graphics this blog post is about though.
Re:Leveraging Rust and the GPU to render user interfaces at ... by pama on Thursday March 09, 2023 @07:01AM (#35080403)
It uses glow, GL on whatever, so OpenGL when it exists.
Re:Leveraging Rust and the GPU to render user interfaces at ... by littlestymaar on Thursday March 09, 2023 @08:43AM (#35081057)
That doesn't mean it's doing any kind of GPU acceleration of 2D graphics.

Given that they don't talk about it in the README, I'm pretty sure they don't.

Re:Leveraging Rust and the GPU to render user interfaces at ... by decremental on Thursday March 09, 2023 @08:57AM (#35081185)
I use egui. The library itself is agnostic but relies on backend libraries for rendering, all of which (or at least the official ones) render on the GPU.
Re:Leveraging Rust and the GPU to render user interfaces at ... by pzo on Thursday March 09, 2023 @09:54AM (#35081768)
have a look at what egui creator (and his team) been doing with rerun [0] Egui seems well suited to render even tens of thousands pointcloud with wgpu backend.

[0] https://www.rerun.io/

Re:Leveraging Rust and the GPU to render user interfaces at ... by wumpf on Tuesday March 14, 2023 @05:44AM (#35149176)
Rerun dev here :). Yes, we're using egui with its wgpu backend! As someone else pointed out it is backend agnostic - it essentially generates triangles & textures in GPU friendly way and passes those down to a backend implementation.

All the visualizations like the 3D scenes with point clouds etc. are rendered with our open-source in-house renderer ("re_renderer") which itself is then passing wgpu surfaces/commands to the egui wgpu backend that composites everything together then.

Re:Leveraging Rust and the GPU to render user interfaces at ... by as-cii on Thursday March 09, 2023 @06:53AM (#35080364)
Hey rob74! Antonio here, author of the post.

Zed is not constrained to use fixed-width fonts and supports all kinds of fonts, monospaced and variable-spaced alike (ligatures and contextual alternates included). Even though we use a glyph atlas, we rely on CoreText for shaping and rasterization (rendering sub pixel variants as well). In practice, this means that text is indistinguishable from a piece of text rendered by the operating system.

Re:Leveraging Rust and the GPU to render user interfaces at ... by gostsamo on Thursday March 09, 2023 @07:06AM (#35080428)
Does your framework have any accessibility features? I'm a screen reader user and having responsive UI is wonderful as far as it is accessible at all.