Re: [AD] Color convertors

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


> That was kindly made by Bob to accomodate the BeOS needs =)
> Under BeOS in 8bit desktop mode you can't change the palette: you have a
> global system palette only, and you have to live with it.

Under Windows too I think.

> This means that an Allegro palette needs to fit into this system one, so a
> conversion is still needed. So yes, the driver needs to update the LUT
> everytime the Allegro palette changes...

That's very slow, isn't it ?
Why not use the following sheme:

                  Allegro palette                        driver LUT
8-bit index  --------------->  12-bit RGB ----------> 8-bit index

In this way, you don't need to recalculate the LUT each time the palette
changes. The drawback is of course you use one more lookup operation for the
conversion.

> Anyway cool, it looks like you're really quickly redoing the routines,
> thanks a lot! The BeOS port would have been broken in the upcoming
> new WIP without them...

I'm not redoing anything, I'm simply adapting a little Bob's code and fixing
minor glitches.

Btw, Bob, great work ! Now Allegro can convert rectangles of any size
between any color depths

---
Eric Botcazou
ebotcazou@xxxxxxxxxx



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