On Mon, Jul 30, 2007 at 07:22:19PM +0800, Michael Metsger wrote:
> I have a problem.
> First I make surface with prelocated data(default videomode 640x480x16):
> size = 64*64*2;
> void *bmpdata = malloc(size);
> bmpdata = memset (&bmpdata,0xFF,size); //white square 64x64
^
Bad.
> Then I Create surface and blit:
> out_desc.caps = DSCAPS_SYSTEMONLY;
> out_desc.flags=(DFBSurfaceDescriptionFlags)(DSDESC_CAPS|DSDESC_WIDTH|DSDESC_HEIGHT|DSDESC_PIXELFORMAT|DSDESC_PREALLOCATED);
> out_desc.width = 64;
> out_desc.height = 64;
> out_desc.pixelformat = DSPF_RGB16;
> out_desc.preallocated[0].data = (void*) bmpdata;
> out_desc.preallocated[0].pitch = 64*2;
> out_desc.preallocated[1].data = NULL; //What is it? Please answer.
> out_desc.preallocated[1].pitch = 0;
It's the back buffer, but since you don't set DSCAPS_DOUBLE you can
ignore it.
--
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev