Use cl-cairo2 for drawing menus, panels etc
I've managed to pass pixel buffer from cairo directly to texture without copying it into a lisp array but cairo uses reversed argb format which OpenGL is supposed to support but I think either cl-opengl doesn't or there's no way to make cepl use it. If I'm not mistaken it's both and needs to be fixed in both libraries. There are two workarounds:
- Write a c library with a single function to switch blue and red components.
- Pass bgr colors to cl-cairo2:set-source-rgb.
Off the top of my head: can we just use a custom shader to swap the components?
For ages I was drawing components in the wrong order (the gif in the readme is an example, the colours are incorrect). The fix was just swapping the colours in the shader.
I found a way to load it with correct pixel format, but it requires a call to internal cepl.types::make-pixel-format.