Re: [AD] makecol and 32 bit mode |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] makecol and 32 bit mode
- From: Elias Pschernig <elias@xxxxxxxxxx>
- Date: Sun, 30 Jul 2006 15:19:39 +0200
On Sun, 2006-07-30 at 11:21 +0100, Peter Hull wrote:
> I noticed that makecol always returns a colour with zero alpha in 32
> bit mode. This seems a bit useless; is there a good reason for it?
>
> makecol just delegates to makecol32, which would be trivial to fix
> (see below). However I'm not quite sure where the bitmap mask colour
> comes from - should this be magic pink with zero alpha or magic pink
> with 255 alpha?
>
In 4.2, alpha is generally unsupported currently, and in 32-bit mode I
guess the alpha component should be ignored with masked blitting (don't
know if it is the case though).
Where alpha is supported is only as various special blenders, for
blitting with set_alpha_blender() and draw_sprite().
I agree that it is useless when working with e.g. AllegroGL. But I'm not
sure we can change it now. For 4.3 though, alpha should just be another
color component like r, g, b and nothing special. And color keying would
be the special case.
So:
AL_COLOR c = al_color_f(1, 0, 0, 0.5);
al_line(x1, y1, x2, y2, c);
(or however the API will look, I have no idea) should draw a red line
with 50% transparency.
--
Elias Pschernig