RE: [AD] Some questions

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


Title: RE: [AD] Some questions

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

AFAIK, they're just inline writers, they access line[] directly.
So they're fast. There *might* be optimizations issues as some
compilers might optimize better direct code than inline functions
but I'd imagine the differences to be very small, if any.

> 2. Can you call both bmp_write_line and bmp_read_line on the
> same line  
>    of a bitmap at the same time, and read/write from that
> line? The docs
>    explicitly say you can't do it with different lines, but
> are unclear 
>    when it comes to the same line.

I think this was only due to old banked video cards. I think
read/write on the same line is fine, though I'm not sure.
Why do you need reading at the same time ? You want transparency
on your text ?

> 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()?

A backup renderer would be a fix for any cards that might not
like reading and writing to the same bank, if any. I'd say
have a look at the Gouraud sprite renderer, which does mode X
as well.

--
Vincent Penquerc'h



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