ulubis icon indicating copy to clipboard operation
ulubis copied to clipboard

Use cl-cairo2 for drawing menus, panels etc

Open naryl opened this issue 8 years ago • 2 comments

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:

  1. Write a c library with a single function to switch blue and red components.
  2. Pass bgr colors to cl-cairo2:set-source-rgb.

naryl avatar Apr 30 '17 12:04 naryl

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.

malcolmstill avatar Apr 30 '17 12:04 malcolmstill

I found a way to load it with correct pixel format, but it requires a call to internal cepl.types::make-pixel-format.

naryl avatar May 03 '17 16:05 naryl