Re:UnicodePlots
by jrichardshaw on Sunday April 09, 2023 @04:35PM
(#35506237)
If you happen to use `iTerm2`, then https://github.com/daleroberts/itermplot works very well. I've used it before and can recommend it pretty highly.
[ Parent
| on HN ]
Is iTerm2 GPU accelerated? Wasn't aware it could do that kind of thing. I didn't use it in years, admittedly, haven't had a Mac for a while.
iTerm2 is GPU accelerated since 2018, yes. Other terminals on Mac that I know of (Kitty, Alacritty, Warp) are also GPU accelerated.
You don't really need GPU acceleration for 2d graphics (and neither for simple 3D). The CPU is more than enough for that.
I understand, but without some kind of direct rendering going on, I can't see how this would work on a terminal emulator.
> without some kind of direct rendering going on, I can't see how this would work on a terminal emulator.
Nah.
You just dump the pixels one by one to the screen using a for loop. You can even do some cpu math with each pixel if you want, and and the end you call XPutImage with the raster (or whatever your toolkit offers). This runs at more than 30fps in fullhd on a 10 year old cpu.
Notice that xterm is blazingly fast and runs entirely on the cpu.
The GPU is not really needed for the basic stuff a terminal emulator does. Of course, if you want to do crazy stuff like scaling by enormous factors, or ultra-fast scroll without skipping tricks, you'll need GPU support.
I see. I'm not nearly qualified enough to talk about that, admittedly. Drawing the pixels isn't the problem, it's updating them fast enough, then?