[AD] Component ordering and mixing color depths

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


Hi,

In my current program, I am using 32-bit RGBA sprites that I am drawing on a 16-bpp bitmap. However, the RGB ordering is different in between the 16-bpp and 32-bpp bitmaps, causing the incorrect colors to show up (I am not using the Allegro blenders).

Writting two versions of the blending function (to work with RGBA <-> RGB and RGBA <-> BGR, or BGRA <-> RGB and BGRA <-> RGB) is not a viable option.

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?

I am ready to write a patch if necessary.


--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/
The peer will come and reset your connection. RUN WHILE YOU STILL CAN!





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