Claudio Ciccani schrieb:
> Michael Metsger wrote:
>> I'm newbie in directfb. I want to know:
>> 1)How can I put bitmap (o_glyph = (bitmap*)glyph;) on surface?
> 
> Basically there are two ways to do this:
> 1. Lock() the surface, copy the bitmap contents to surface's memory,
> Unlock()
> 2. Create a preallocated surface (DSCAPS_PREALLOCATED) with the bitmap
> contents, then Blit() the preallocated surface to your surface.

If you're blitting the bitmap just once, it might be a good idea to use
the DSCAPS_SYSTEMONLY flag. Otherwise, in case of acceleration the
buffer could be transfered to video memory, which is good only if you
need to blit it more than once. Blitting directly using software code
is like transfering into video memory. So in either case you have the
software copy.

>> 2)How can I put point on surface?
>>  
> 
> Using FillRectangle().

In case of many points Lock() - write points - Unlock() would be better.
Or use FillRectangles() or even FillSpans() if it suites you. The latter
has only half of the data needed to setup (x/w array instead of x/y/w/h).

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to