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.