> 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.
I'm not sure that it addresses the issue, but I'm using for the OVER operator (which is the only one I was interested in): glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_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. Cairo has a CAIRO_FORMAT_A8 surface type, not sure how well drawing with Pango into one works... Btw, are there plans to have ClutterTexture of GL_LUMINANCE type? I do visualization of some scientific data and use GL for applying a colormap. Thanks, Bogdan _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE-- To unsubscribe send a mail to [EMAIL PROTECTED]
