> IIRC the AiRGB thing comes from the fact that the hardware blending uses
> this formula:
>
> video * alpha + graphics * (1-alpha)

That's right.  The hardware allows you to set the alpha for the video
layer, either to a fixed value or to come from a separate alpha layer
(not currently supported in DirectFB) or from the graphics layer's
alpha.  If you do the latter, you get the alpha inverted but it's
nontheless a very useful feature.

> The uv_ovl_map_alpha() function appears to always set the opacity to 0
> with ALPHA_WIN_BLEND_GRAPHIC. Has anyone tried setting opacity to 0xF
> with ALPHA_WIN_BLEND_GRAPHIC? Unlikely as that sounds maybe it would
> invert the alpha...

I'll give it a go and let you know.  Seems a long shot but worth a go.

> It looks like the driver only allows some basic operation on AiRGB
> surfaces.

Until recently, it didn't support anything.  Now it supports simple
blits and draws.  You can also pretend the surface is ARGB and do an
XOR draw with 0x000000ff before flipping.

> That restriction seems artificial at least for using AiRGB
> source surfaces because it should be a simple matter of inverting the
> alpha with the blending functions.

Correct.  I did look into this and concluded that I could support
AiRGB as a source format fairly easily.  Unfortunately, the use case
you really want is AiRGB as destination and I can't see an easy way of
doing that (but that doesn't mean there isn't one!).  Any suggestions?

Regards,

Mark

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to