[cairo] question about the image backend

Cosmin Apreutesei cosmin.apreutesei at gmail.com
Sat Aug 11 14:41:44 PDT 2012


Hi,

I want to create an OpenGL texture with the data from a cairo image
surface that I get with cairo_image_surface_get_data(). The data is in
BRGA format which works directly with glTexImage2D(). However, I
noticed that on this format, the alpha channel is lost (computed into
into the RGB values). Can I disable this processing so I can preserve
the alpha channel? Currently I'm undo'ing this before loading the
texture but it's slow, lossy, and screws with the data buffer (which
might confuse cairo, not sure).

Thanks,
Cosmin.


More information about the cairo mailing list