Hi!
I wanted to blit a surface with per-surface alpha and colorkey onto my
screen.
colorkey works, but not per-surface alpha. (Even not without colorkey)
This is how I prepared the surface:
SDL_SetColorKey(image, (SDL_SRCCOLORKEY|SDL_RLEACCEL), *(Uint8
*)image->pixels);
SDL_SetAlpha(image, SDL_RLEACCEL, 10);
Then i got the idea that I might need a RGBA screen:
SDL_SetAlpha(screen, SDL_RLEACCEL, SDL_ALPHA_OPAQUE)
But this didn’t help…
The surface is alway blitted opaque (not the colorkeyd pixles, of course)
What am I doing wrong?
Daniel Stiefelmaier
[…]
SDL_SetAlpha(image, SDL_RLEACCEL, 10);
How about ORing in the SDL_SRCALPHA flag here?
Then i got the idea that I might need a RGBA screen:
SDL_SetAlpha(screen, SDL_RLEACCEL, SDL_ALPHA_OPAQUE)
This doesn’t make sense. You could only use that with OpenGL. (It’s what
the dreaded SDL_OPENGLBLIT feature uses, IIRC.)
//David Olofson — Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
-------------------------------------> http://olofson.net -'On Sunday 07 April 2002 18:48, Daniel Stiefelmaier wrote: