On Mon, Nov 21, 2005 at 03:30:01AM +0100, [EMAIL PROTECTED] wrote: > > I've confirmed that the Object surfaces contain alpha layers. The > problem I have encountered now is while Blitting these surfaces to the > window surface, pixels with values between completely transparent and > completely opaque affect the window surface's alpha layer. I have read > the mailing list archives and found Rasterman running into the same > problem, however he never received a response, that I could find > anyway. > > http://www.directfb.org/index.php/mailinglists/directfb-dev/2002/11-2002/msg00129.html > > I have thought about Lock()ing the surface and manually blending all > other surfaces, but I'd rather not if I am simply missing a > BlendingFunction or something along those lines. > Any help on this issue would be greatly appreciated.
What you probably want is surface->SetSrcBlendFunction( surface, DSBF_ONE ); surface->SetDstBlendFunction( surface, DSBF_INVSRCALPHA ); surface->SetBlittingFlags( surface, DSBLIT_SRC_PREMULTIPLY ); The source alpha will still affect the destination alpha by making it slightly more opaque. If you would like to leave the destination alpha completely untouched you would need different blending functions for A and RGB components. That sort of thing is not currently supported by DirectFB and it would be a software fallback on most older graphics cards. I guess radeon and geforce chips could do it in hardware. -- Ville Syrjälä [EMAIL PROTECTED] http://www.sci.fi/~syrjala/ _______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
