Introducing PALE (Picture & Animation Library for Emacs)

I have been trying to push the limits of #Emacs to do real-time graphics since I started working on Emacs Reader (~1 year).

Emacs Reader has to do a lot of hacks to be efficient in performance, and in doing so we encountered memory leaks of horrible kinds (in Emacs itself), GC overloading of strings and other issues.

Finally over the last month or so, I decided to build a graphics library called PALE for Emacs which will leverage dynamic modules for efficiency. And here's the result, the animation below is hardware-accelerated, i.e the textures are rendered on GPU and then displayed on Emacs.

There are jitters here and there, but I still have a lot of room for optimization (I think!). The library will provide an API similar to svg.el, on top of that I will provide a C API so that dynamic module packages like Reader can directly provide image data from C and use it.

Right now it lives inside Emacs Reader's git, but it will eventually be separated:

https://codeberg.org/divyaranjan/emacs-reader/src/branch/partial-rendering/pale

@divyaranjan Ooh! Can we use it to add arbitrary text decoration in standard text buffers, or does it have to live in a PALE specific buffer?
@pdcawley Arbitrary text buffers! You can ask Pale to only take a certain region of the buffer and you can continue doing other stuff in the same buffer. Pale has no notion of a special buffer.