> > In most cases, it's preferable to implement points rendering yourself
> > (Lock()/put points/Unlock()).
>
> I'm confused. Please, see little example how to put points.

// assume that pixelformat of the surface is RGB32
int pitch=0;
int x = 10;//x position of the first point
int y = 10;
u32 *buf = 0;
DFBResult ret;
// get direct access to the surface memory
ret =surface->Lock( surface, DSLF_WRITE, &buf, &pitch );
if ( DFB_OK == ret  ) {
     buf[ x + y*pitch/4 ] = 0xFF0000; // red pixel
     x++;
     buf[ x + y*pitch/4 ] = 0xFF00;  // green pixel
     x++;
     buf[ x + y*pitch/4 ] = 0xFF;  // blue pixel
     // and so on ...
}
surface->Unlock( surface );


-- 
Best Regards
Nikita Egorov
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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

Reply via email to