News for hackers. Stuff that matters.
Re:Leveraging Rust and the GPU to render user interfaces at ... by nottorp on Thursday March 09, 2023 @07:01AM (#35080410)
I don't understand. Why would you need to render a user interface constantly at 120 fps, instead of just updating it when something changes? Laptop batteries last too long these days? Electricity too cheap?
Re:Leveraging Rust and the GPU to render user interfaces at ... by as-cii on Thursday March 09, 2023 @07:05AM (#35080427)
Hey nottorp. Antonio here, author of the post.

Zed and GPUI use energy very judiciously and only perform updates when needed. The idea is that we can render the whole application within ~8ms, and that shows everywhere: from typing a letter to scrolling up and down in a buffer. However, if the editor is sitting there idle, we won't waste precious CPU cycles.

Thanks for the feedback!

Re:Leveraging Rust and the GPU to render user interfaces at ... by nottorp on Thursday March 09, 2023 @09:26AM (#35081473)
Yeah, might want to edit the title a bit. Or not, considering these concepts are getting lost.

I mean, the win16 api from ages ago had support for invalidating specific screen regions etc. It probably got lost somewhere in the transition to javascript...

Re:Leveraging Rust and the GPU to render user interfaces at ... by rubymamis on Thursday March 09, 2023 @01:00PM (#35084375)
Will you allow developers access to your GUI framework? What about open-sourcing it?
Re:Leveraging Rust and the GPU to render user interfaces at ... by sdflhasjd on Thursday March 09, 2023 @07:03AM (#35080419)
"Because it looks good" is probably the most popular reason.
Re:Leveraging Rust and the GPU to render user interfaces at ... by nottorp on Thursday March 09, 2023 @07:03AM (#35080422)
But if nothing changes it looks as good at zero fps :)

Edit: Yay, it's a text editor. What happened to only redrawing the line that's being edited and the status indicators?

Re:Leveraging Rust and the GPU to render user interfaces at ... by flohofwoe on Thursday March 09, 2023 @09:14AM (#35081340)
It's not about rendering static screens at 120Hz, but rendering anything that's animated at a smooth 120Hz.