Hi,

i'm using directfb 1.0. The hardware it runs on supports five layers; two of
them are the video layer and the primary layer. I use the primary layer to
draw a semi-transparent gui (osd) over the video.

The problem i have is that i don't know how to clear the surface of the
primary layer keeping the transparent effect over the video. The only way i
can clear the primary surface is doing a primary_srfc->Clear (primary_srfc,
0, 0, 0, 255) but that way i can't see the video through the primary layer.
I guess it has something to do with the layer/surface configuration.

This is how i create the primary surface:

  dsc.flags      = DSDESC_CAPS;
  dsc.caps      = DSCAPS_PRIMARY | DSCAPS_FLIPPING;
  DFBCHECK(dfb -> CreateSurface(dfb, &dsc, &primary_srfc));

  DFBCHECK(primary_srfc -> SetDrawingFlags(primary_srfc, DSDRAW_BLEND));

  DFBCHECK (primary_srfc -> SetBlittingFlags (primary_srfc,
DSBLIT_BLEND_ALPHACHANNEL));

Then, i draw things and this is how i try to clear it (i also tried one more
Flip and one more clear):

  DFBCHECK (primary_srfc -> Clear (primary_srfc, 0, 0, 0, 0));
  DFBCHECK (primary_srfc -> Flip (primary_srfc, NULL, DSFLIP_WAITFORSYNC |
DSFLIP_BLIT));
  DFBCHECK (primary_srfc -> Clear (primary_srfc, 0, 0, 0, 0));

which doesn't to anything visible. If i clear with total opacity (0,0,0,255)
the screen goes black and i can't see the video.

If you need some more info i can provide it. Any help is appreciated.

Thanks,

-- 
Alejandro Vazquez Fente
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to