I wrote a small test file (http://pastebin.com/m3ff4cae9) wich tries to draw
some basic overlapping shapes using their alpha channel.
My ultimate aim would be to be able to, say, blit an opaque surface S1 on a
transparent one S2, then S2 on a opaque S3, then S3 to the screen. I use a
personnal backbuffer in addition to the double buffering.
Using the example above, I notices interesting bits:
- When specifying the flag SDL_HWSURFACE, the Surfaces returned by
"SDL_Surface* createS(int, int)" have the flag SDL_SRCALPHA unset.
- With SDL_SWSURFACE, the flag is set, but the surfaces remains fully
The code is compiled and linked against SDL svn, which might be an issue. I
haven’t found docs nor time to look in the new API. Please tell me if it works
as expected on SDL 1.2.