Jérémy Morel wrote:
Thanks to Niels, Haithem and Chris responses, the fade out effect now works.

Chris > It looks like the DSDRAW_BLEND was the most important of all the missing flags. Without it no alpha blending is possible. Thanks for the indication. I'll switch to layers when my project is over and I enter the refinishing phase. For now I'm concentrating on making it work.

Haithem > Thanks ! Setting the pixelformat parameter without the DSDESC_PIXELFORMAT wasn't exactly the best thing to do. And I would have totally missed it if it weren't for you. Out of curiosity, I took off the flag to measure its effect once blending is activated: it gives weird results in the fading out effect. Kinda reminded me of the of the movie "2001 a space odyssey" :)

Niels > Just adding the same layer over and over should work: the fade out effect should be linear and end with a perfectly white image. However it doesn't, I discovered it once the flags were correctly set. It leaves in the end a kind of waterstamp (see attached image). I already saw that implementing that very same effect with QT, but I can't figure why it does so. I switched to your method, which provides an accelerated version of the effect (from k=30 and over, the image is back to pure white).

I can only say that I would expect this to be something outside the realm of DirectFB/QT - like driver issues or maybe water in your display, just thinking out loud :) I have never seen an effect like that. You can always do "dfbdump -ds -dl" (if you are running multi-core, otherwise you have to call an internal directfb function from your app, check dfbdump sources what it does) to dump the current contents of your DirectFB buffers.

I am also a bit puzzled how you expect to get a whitening effect when you apply the color ARGB 01ffffff over and over; blending normally does ((256-a)*destination)/256 + source, so if your destination is 01010101 then ((256-a)*destination)/256 will give 00000000 (rounding down) and adding the source will bring you back to 01010101 (default premultiplication, as you would need for regular blending). Higher numbers will block at other rouding error related values.

Thanks again to all 3 of you !

--
Jérémy

------------------------------------------------------------------------




------------------------------------------------------------------------

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


--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to