Live data from Hacker News

Leveraging Rust and the GPU to render user interfaces at 120 FPS

zed.dev

121–130 of 212 posts

Re: Leveraging Rust and the GPU to render user interfaces at 120 FPS

#122
post #116

Earlier quoted context omitted.

What's your point? Static linking makes a ton more sense than dynamic linking, except in a few special case niches (like plugin systems). And OTH, event-driven UIs have also been around as long as UIs exist, that makes them at least as 'outdated' as immediate mode UIs.

The industry has moved beyond past decisions for a reason, that is the point. Some of them keep being rediscovered in endless loops of fashion.

> Some of them keep being rediscovered in endless loops of fashion.

The reason for this is often that the environment (mainly the hardware) has changed so much that it may make sense to look into discarded old ideas again. For instance, dynamic linking was extremely important in the age of slow floppy discs and when RAM was counted in kilobytes, but those environmental factors are no longer an issue, and the advantages of static linking outweigh the disadvantages of dynamic linking again.

Re: Leveraging Rust and the GPU to render user interfaces at 120 FPS

#123

"Inspired by the gaming world, we realized that the only way to achieve the performance we needed was to build our own UI framework" I'm surprised you did not look at "Dear ImGui", "Noesis", and "JUCE". All three of them are heavily used in gaming, are rather clean C++, use full GPU acceleration, and have visual editors available. Especially JUCE is used for A LOT of hard-realtime professional audio applications. "Wh…

When we talk about 2D graphics as a research problem, we're talking about native rendering of splines and strokes. JUCE does not have GPU-accelerated splines, it flattens the path to lines and rasterizes the coverage area into a texture that then gets uploaded to the GPU:

https://github.com/juce-framework/JUCE/blob/2b16c1b94c90d0db...

https://github.com/juce-framework/JUCE/blob/2b16c1b94c90d0db...

It also does stroke handling on the CPU:

https://github.com/juce-framework/JUCE/blob/2b16c1b94c90d0db...

Basically, this isn't really "GPU accelerated splines". It's a CPU coverage rasterizer with composting handled by the GPU.

Re: Leveraging Rust and the GPU to render user interfaces at 120 FPS

#124

Earlier quoted context omitted.

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.

Afaik egui isn't doing any kind of the fancy GPU based 2D graphics this blog post is about though.

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 120 FPS

#125

Earlier quoted context omitted.

I agree with your final statement and the seeming lack of research, but are you sure your characterization of JUCE is accurate? You’d surprise a lot of people if you were right about it using GPU acceleration for its UI framework. It does have an OpenGL container that fits into its view object hierarchy if you want to write your own accelerated component, but the rest of the UI is pretty much standard event-loop -> p…

Just checked and even without any additional setup JUCE is using CoreGraphics which is using Metal under the hood. So yes, the platform-specific renderer is using GPU. Also, you can use OpenGL for GUI compositing, too, not only as a 3D context.

CoreGraphics is a CPU rasterizer. It doesn't use the GPU.

Re: Leveraging Rust and the GPU to render user interfaces at 120 FPS

#126
post #44

Earlier quoted context omitted.

> I agree with your final statement and the seeming lack of research, but are you sure your characterization of JUCE is accurate? That JUCE is "heavily used in gaming" for starters is widly innacurate

I personally know multiple people using it in their games and game-related tooling and Roli (the company selling JUCE) even has an official Unreal Engine 4 plugin. So to me, it appears to be widely used.

> Roli (the company selling JUCE)

I know it's tangential to the point that you're making, but JUCE was acquired by PACE in 2020.

Re: Leveraging Rust and the GPU to render user interfaces at 120 FPS

#127
post #11

While I do enjoy a nice and smooth gpu-accelerated ui, I never use a gpu-ui framework for my own project for one simple reason: Almost none of them properly support accessibility. Electron (and in general the web), despite its sluggishness has a very good support for accessibility. Most "traditional" native ui toolkit also do. That would be my advice to anyone making a gpu-accelerated ui library in 2023: Try to suppo…

I can’t speak for this one as it’s proprietary, but You’ll be pleased to hear that pretty much all the open source Rust GUI toolkits either integrate AccessKit or have concrete plans to do so in the immediate future. There are toolkits that can’t even do basic things like render images but have accessibility support :)

That is good to hear !

Re: Leveraging Rust and the GPU to render user interfaces at 120 FPS

#128
post #44

Earlier quoted context omitted.

> I agree with your final statement and the seeming lack of research, but are you sure your characterization of JUCE is accurate? That JUCE is "heavily used in gaming" for starters is widly innacurate

I personally know multiple people using it in their games and game-related tooling and Roli (the company selling JUCE) even has an official Unreal Engine 4 plugin. So to me, it appears to be widely used.

JUCE is sold by Raw Material Software, which was purchased by PACE Anti-piracy, which is part of Avid.

There may be some people you know using JUCE for games, but it’s an odd choice.

Trying to figure out what you might mean, JUCE was involved with the BLOCKS SDK for Roli’s hardware peripherals, but again, that’s not really about gaming and definitely not about any familiar kind of gaming.

That said, I’m sure you’re relating the best information you have and very likely just transposed some detail by accident and are now caught in a relentless, exhausting online nitpick. We’ve all been there. If you figure out what it was, I’d love to hear it!

Post reply on HN