Hacker News new | ask | show | jobs
by dankamongmen 2212 days ago
You can use ncplane_blit_rgba() and ncplane_blit_bgrx() from Notcurses to freely blit RGBA data directly to the terminal. In addition, you'll benefit from the various advanced blitters built into Notcurses. Simply moving from pixels to cells in the naive method doesn't look good due to the different aspect ratios. Half blocks are a much better solution, and my quadrant blitter is superior to even those IMHO (all are available via the NCBLIT_* macros).
1 comments

As an example, here's Notcurses as a backend for NEStopia, allowing you to play NES in the terminal: https://www.youtube.com/watch?v=PHOHxqGkTUA&t=77s (this video was very early and raw, apologies for the production quality or lack thereof).

I've experimentally rigged Notcurses as a backend for both Mesa and Cairo. Works fine, so long as you've got sufficient cells to back your canvas.