[SDL] simple alpha problem
Rainer Deyke
root at rainerdeyke.com
Wed Nov 27 18:31:00 PST 2002
Chris Thielen wrote:
> I'm having a pretty simple problem with alphas. I loaded a PNG file,
> converted it to its final destination storage surface using
> SDL_DisplayFormatAlpha(), and then did: SDL_SetAlpha(my_surface,
> SDL_SRCALPHA, 150); and blitted it against a black surface, but it
> appears full alpha (no transparency at all). Anybody know whats
wrong?
> Should I post more information here?
'SDL_DisplayFormatAlpha' creates an alpha channel, and per-surface
alpha is ignored in the presence of an alpha channel. Call,
'SDL_SetALpha' on the original surface, then use plain
'SDL_DisplayFormat'.
--
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com
More information about the SDL
mailing list