Hi; On Fri, 2008-04-25 at 19:03 +0200, Bogdan Nicula wrote: > > >> Is there a problem here? I was using with great success GL and > cairo with no format conversion. > >> > > > > What GL/Cairo formats were you using out of interest ? > > The "native" one on "normal" computers (I have no idea about embedded > computers), which happens to be the Cairo one, the fastest as far as I > know: > (uint32) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) > > On the GL side, something like: > glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, w, h, 0, > GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, > data);
Ok, but you are not un premultiplying the alpha (which afaik is always used with the cairo image surface - see source of clutter-cairo). All though it looks ok on the surface it will likely have issues in certain situations. I have never found a GL pixel format that uses pre mulled alpha. Also with the current clutter pango renderer we only use 8bit alpha textures for the glyphs (rather than 32bpp as above), setting color via GL - this obviously saves alot of texture memory. I am not sure how easy this would be to efficiently support with pangocairo. == Matthew -- To unsubscribe send a mail to [EMAIL PROTECTED]
