Update.

I  used Lock to get access to the secondary surface pointer. This works ok but 
no acceleration. If I unlock it before blitting then I get acceleration but no 
picture. 

I do the following:

sdsc.flags = //DSDESC_CAPS | 
DSDESC_WIDTH |
DSDESC_HEIGHT |
DSDESC_PIXELFORMAT;// |
// DSDESC_PREALLOCATED;
//sdsc.caps = DSCAPS_SYSTEMONLY; 
//sdsc.preallocated[0].data = underlay_osb.pBits;
//sdsc.preallocated[0].pitch = underlay_osb.nStride;
ret = s_dfb->CreateSurface( s_dfb, &sdsc, &s_osbSurface );

DFBSurfaceLockFlags flags = DSLF_WRITE | DSLF_READ ;
void * ptr;
int pitch;
s_osbSurface->Lock(s_osbSurface,flags,&ptr,&pitch);
underlay_osb.pBits = ptr;
//s_osbSurface->Unlock(s_osbSurface);//if I call this I get acceleration but no 
picture
s_primary->SetBlittingFlags( s_primary, DSBLIT_NOFX );
s_primary->Blit( s_primary, s_osbSurface, &clipRect, x, y );


Any ideas why I get no picture if I unlock the secondary surface.

How can I get around this problem.

Homam. 


----- Original Message ----
From: Homam Dabis <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, 5 October, 2007 10:24:29 AM
Subject: [directfb-users] Unable to use hardware acceleration


We are attempting to blit a secondary onto a primary surface. 
 
The primary is created as follows:
 
/* Create the primary surface */
sdsc.flags = DSDESC_CAPS | 
DSDESC_WIDTH |
DSDESC_HEIGHT |
DSDESC_PIXELFORMAT;
sdsc.caps = DSCAPS_PRIMARY | DSCAPS_VIDEOONLY;
ret = s_dfb->CreateSurface( s_dfb, &sdsc, &s_primary );
 
Whist the secondary is created as follows:
 
sdsc.flags = DSDESC_CAPS | 
DSDESC_WIDTH |
DSDESC_HEIGHT |
DSDESC_PIXELFORMAT |
DSDESC_PREALLOCATED;
sdsc.caps = DSCAPS_SYSTEMONLY; 
sdsc.preallocated[0].data = underlay_osb.pBits;
sdsc.preallocated[0].pitch = underlay_osb.nStride;
ret = s_dfb->CreateSurface( s_dfb, &sdsc, &s_osbSurface );
 
s_primary->SetBlittingFlags( s_primary, DSBLIT_NOFX );
s_primary->Blit( s_primary, s_osbSurface, &clipRect, x, y );
 
This works but without hardware acceleration because of the "sdsc.caps = 
DSCAPS_SYSTEMONLY". Not setting this parameter results in no picture on the 
screen which I am unsure why. The rendering is done via third party hence the 
preallocated pointers.
 
Any idea why I dont get a picture if I don't set the DSCAPS_SYSTEMONLY 
parameter.
 
If not possible then one idea which I want to know if feasible is to do the 
following
 
underlay_osb.pBits = secondary surface pointer.
 
Is it possible to do that and if so how could I get access to the secondary 
surface pointer. Would this create other problems.
 
Any other suggestions/ideas would be grately appreciated.
 
By the way, I know that hw acceleration works since I ran df_dok.
 
Thanks.
 
Homam.
 
 
 



Yahoo! Answers - Get better answers from someone who knows. Try it now.


      ___________________________________________________________
Nervous about who has your email address? Protect yourself with AddressGuard, 
new from Yahoo! Mail.
http://uk.docs.yahoo.com/mail/addressguard.html
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to