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: Mon, 31 Jul 2006 15:41:02 +0200
On Mon, 2006-07-31 at 14:15 +0100, Peter Hull wrote:
> I was hoping to support alpha sprites in set_mouse_sprite(), but never
> mind, maybe in 4.3! (at the moment, the built-in mouse cursor is
> generated with zero alpha and is therefore invisible in 32bit mode)
Oh, we also will need to support alpha in the window background, I think
I've seen some fixes related to that in SDL. Need to investigate once I
get a graphics card which can handle XComposite.
> By the way, in OS X, I often come across premultiplied alpha i.e each
> of the colour components are already multiplied by the fraction alpha.
> For example, a 50% translucent pure red would be (r=0.5, g=0.0, b=0.0,
> a=0.5), not (r=1.0, g=0.0, b=0.0, a=0.5)
>
> Does it make sense to do this in Allegro?
>
What is the difference, from a user view?
In OpenGL, I guess I would change:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
to:
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
But I don't see how it would have any impact on anything.
Hm, that is, maybe there are cases where it matters, e.g. if I have some
special effect where a sprite and its alpha channel separate. In that
case, pre-multiplied would be bad.
--
Elias Pschernig