Quoting Mark Adams:
> I'm having no luck trying to use the DVD subpicture layer (unichrome
> driver).  I have confirmed that the layer surface has a sensible
> palette and that its pixels are being set to non-transparent values. 
> However, I don't see anything on the screen (just the video and
> graphics layers).
> 
> Any ideas?  Is there any example code around that uses this layer (I
> haven't been able to find any)?

Try "df_dok --dfb:primary-layer=2" or other examples.

> I'm using the unichrome driver's video underlay mode but have tried a
> number of the DirectFB test apps with and without this option: I just
> get a black screen when using the subpicture layer.
> 
> Any help appreciated.
> 
> I'm also interested to know if this layer scales with the video plane
> or not (for my purposes I'd rather it didn't).

Layers always scale on their own.

> IDirectFBDisplayLayer spic_layer = sm_dfb.GetDisplayLayer(2);
> spic_layer.SetCooperativeLevel(DLSCL_EXCLUSIVE);
> spic_layer.SetOpacity(255);
> IDirectFBSurface spic_surface = spic_layer.GetSurface();
> 
> void *data;
> int pitch;
> spic_surface.Lock(DSLF_WRITE, &data, &pitch);
> for (int y=100; y<200; y++)
>     for (int x=100; x<200; x++)
>         *(reinterpret_cast<char *>(data) + pitch * y + x) = 0x88;
> spic_surface.Unlock();

If it's not single buffered, you're missing a Flip().

But as you didn't set a layer configuration, you should
get the default configuration with single buffer mode.

-- 
Best regards,
  Denis Oliver Kropp
 
.------------------------------------------.
| 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