Re: [AD] Component ordering and mixing color depths

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


> Should Allegro set up the component shifts in such a way that the RGBA
> components are in the same order for all color depths? Is there a good
> reason why this is not so?

If I understand correctly, RGBA sprites are currently never drawn directly to 
bitmaps, i.e without applying a blending formula for each pixel, so your 
reasoning is that swapping the components in the process would be only 
marginally slower, isn't it ?

Two objections:
- I think that drawing a RGBA sprite onto a bitmap without using the alpha 
channel (i.e with draw_sprite) ought to be supported, in which case the RGBA 
sprite must have the same color layout as a regular 32-bit sprite.
- Can't we imagine hardware-accelerated blitting routines using the RGBA 
format, in which case the layout of the format would likely match that of the 
regular 32-bit format ? But you're the specialist here.

-- 
Eric Botcazou




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