Re: [AD] Some questions

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Laurence Withers wrote:
1. Is using bmp_write_line et al. as fast as using line[] access? If not, what sort of difference is there?

There is probably a very small overhead with bmp_write_line(). But note that you only need to call bmp_write_line() once per scanline. So if you are drawing one scanline at a time then the overhead is negligible. AFAIK Allegro never makes a special case for pure memory bitmaps in order to use line[] instead of bmp_write_line().

3. I take it that something special has to be done with Mode-X bitmaps?
If so, is it easy stuff or should I provide a backup renderer which uses get/putpixel()?

It's quite complicated but not impossible to figure out. You can take a look at how, e.g., rotate_sprite() does it. I don't know if it applies to you, but if you are copying from one bitmap to another, then getpixel() also allows you to have screen bitmaps in the source.

Sven



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/