Martin Pickett
2012-03-15 16:40:18 UTC
Hello,
I'm trying to use the multi-application version of DirectFB to allow two separate applications to draw to the screen, and I can't work out how to get started.
I'm using DirectFB 1.4.11 on a ST-Linux/STAPI host. We have previously had the two applications working fine as stand-alone apps, running one at a time, but now we need to have both running simultaneously and overlaying their output.
The stand-alone code for each application follows the same procedure:
DFBCHECK (DirectFBInit (NULL, NULL));
DFBCHECK (DirectFBCreate (&dfb));
DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN));
DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary ));
And then draws to the primary surface. This works OK, and even running them simultaneously results in no error, even it doesn't work properly, as the second application to run seems to steal the primary surface and have total control.
I have no need for the two applications to coordinate or even be aware of the existence of the other - I just want both to be able to draw to the screen.
The methods I have tried:
1) Use DFSCL_NORMAL instead of DFSCL_FULLSCREEN.
2) Not calling dfb->SetCooperativeLevel() or dfb->CreateSurface(), but instead use:
dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer )
layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE )
layer->CreateWindow( layer, &dsc, &window )
window->GetSurface( window, &primary )
and draw to the surface of the window - this seemed to be the most likely, but also doesn't appear to work.
Am I going about this entirely wrong?
Do I need to share something using fusion to get the two to cooperate?
Should this work, and I've just missed a step or gotten it the wrong way around?
Any help gratefully received, as I'm just poking around randomly now.
Thanks,
Martin
I'm trying to use the multi-application version of DirectFB to allow two separate applications to draw to the screen, and I can't work out how to get started.
I'm using DirectFB 1.4.11 on a ST-Linux/STAPI host. We have previously had the two applications working fine as stand-alone apps, running one at a time, but now we need to have both running simultaneously and overlaying their output.
The stand-alone code for each application follows the same procedure:
DFBCHECK (DirectFBInit (NULL, NULL));
DFBCHECK (DirectFBCreate (&dfb));
DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN));
DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary ));
And then draws to the primary surface. This works OK, and even running them simultaneously results in no error, even it doesn't work properly, as the second application to run seems to steal the primary surface and have total control.
I have no need for the two applications to coordinate or even be aware of the existence of the other - I just want both to be able to draw to the screen.
The methods I have tried:
1) Use DFSCL_NORMAL instead of DFSCL_FULLSCREEN.
2) Not calling dfb->SetCooperativeLevel() or dfb->CreateSurface(), but instead use:
dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer )
layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE )
layer->CreateWindow( layer, &dsc, &window )
window->GetSurface( window, &primary )
and draw to the surface of the window - this seemed to be the most likely, but also doesn't appear to work.
Am I going about this entirely wrong?
Do I need to share something using fusion to get the two to cooperate?
Should this work, and I've just missed a step or gotten it the wrong way around?
Any help gratefully received, as I'm just poking around randomly now.
Thanks,
Martin
--
Martin Pickett | Software Engineer | Exterity Ltd - BUILDING IPTV
tel: +44 1383 828250 ext 293 | fax: +44 1383 824905
e: ***@exterity.com | w: www.exterity.com | skype: exterity.martin.pickett
Martin Pickett | Software Engineer | Exterity Ltd - BUILDING IPTV
tel: +44 1383 828250 ext 293 | fax: +44 1383 824905
e: ***@exterity.com | w: www.exterity.com | skype: exterity.martin.pickett