Thanks for your reply about opacity problem!
 
I tried IDirectFBDisplayLayer::SetConfiguration() with DLCONF_OPTIONS & 
DLOP_OPACITY over DirectFB 1.0.0, 1.0.1 and 1.1.0, they are all return error 
says: Not supported! the code segment like this:
 
DFBCHECK(dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ));
DFBCHECK(layer->GetConfiguration( layer, &layer_config ));
DFBCHECK(layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE));
layer_config.flags = DLCONF_OPTIONS;
layer_config.options = DLOP_OPACITY;
DFBCHECK(layer->SetConfiguration( layer, &layer_config ));
 
runtime shows:
(#) DirectFBError [layer->SetConfiguration( layer, &layer_config )]: Not 
supported!
 
I also checked the flag by calling layer->GetDescription(), both DLCAPS_OPACITY 
& DLCAPS_ALPHACHANNEL show 0, means system does not support them. seems without 
hardwear support, layer opacity does not work.
 
>From my application, I need to disable DirectFB writing to frame buffer at run 
>time for some specific  period of time and re-enable it short later, is there 
>simple way to do it?
 
Thanks,
Victor 
> > when I change layer's opacity, I hope all content in the > > layer 
> > (background image or window content) will change > > their opacity after 
> > calling layer->SetOpacity()> > This is how it should work if the display 
> > layer properly > supports DLCAPS_OPACITY, and the display layer is 
> > configured > to use the opacity.> > >Can any one tell what's wrong from 
> > following code?> > I believe that with DFB 1.0.1 it's possible to call > 
> > IDirectFBDisplayLayer::SetOpacity even if it is not supported > by the 
> > display layer, so make sure to get the description and > see if the 
> > DLCAPS_OPACITY capability flag is set.> > If it is set, you must then 
> > request that the global/constant > opacity is used by calling 
> > SetConfiguration and specifying > the DLOP_OPACITY flag (don't forget to 
> > set DLCONF_OPTIONS to > indicate there's a valid value in the options 
> > field).> > Regards,> Timothy> > > ------------------------------> I have to 
> > add that the calls to SetCooperativeLevel() are the> reason for the black 
> > screen. The exclusive level creates another> context with another buffer 
> > exclusively for the application. I> fixed the same issue in GdkDirectFB's 
> > get_image(?)_from_drawable(?)> or similar which did it wrong for the root 
> > window/drawable case.> > DLSCL_NORMAL -> shared context, unprivileged> 
> > DLSCL_ADMINISTRATIVE -> shared context, privileged> DLSCL_EXCLUSIVE -> 
> > separate, exclusive context> > So using DLSCL_ADMINISTRATIVE should help. 
> > You can also keep using> DLSCL_EXCLUSIVE, but you should set it before 
> > creating the first window> and keep it.> 
_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to