Anders Bakken wrote:
On Wed, Sep 30, 2009 at 05:00:06PM +0200, ext Niels Roest wrote:
Hi Andres.

I assume you mean DWOP_... and DWCAPS_ALPHACHANNEL.

DWCAPS_ALPHACHANNEL will add an alpha channel to the window back buffer upon creation. example: if the layer, where you will create the window on, has default RGB16, then using DWCAPS_ALPHACHANNEL will make the window instead have ARGB. If the layer is already default alpha capable, e.g. LUT, or ARGB4444, then the window will be created with this format.

DWOP_ALPHACHANNEL will do the blitting operation with alpha blending.
Suppose you have a window with color 0,0,0,0 (black see-through) that you blend onto a background with ff,ff,ff,ff (white opaque). If you do NOT use DWOP_ALPHACHANNEL, the window will simply be copied resulting in a "hole" in the background (the original background is gone, and black instead if you have no layer behind). Using DWOP_ALPHACHANNEL will result in no change, the white background is still visible.

o, and DWOP_ALPHACHANNEL is not possible without DWCAPS_ALPHACHANNEL.

You might need to "Flip" to see the effects.

Greets
Niels

Thanks

I assume then that if I actually explicitly specify the window's
surface's format using DWDESC_PIXELFORMAT the DWCAPS_ALPHACHANNEL
doesn't actually matter (assuming I make sure the format I pass is an
alpha format).

regards

Hm... can't find that in the source code,
looks like you have to set it anyway.

The other way round does work, i.e. if layer is non-alpha, then specifying DWCAPS_ALPHACHANNEL will default to ARGB.

--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to