[SDL] Alpha transparency on created surface?

Peter Mackay mackay.pete+sdl at gmail.com
Wed Aug 8 00:07:12 PDT 2007


Is one of the parameters to SDL_SetAlpha supposed to be set to
SDL_SRCALPHA? I can't remember exactly, but it's worth a check.

Also make sure you specify an alpha mask when creating the surface.

Hope this helps!

Peter

On 08/08/07, L-28C <kixdemp at gmail.com> wrote:
> Hello everyone! :-)
>
> Okay, I need a surface that is fully blank that I can draw objects on.
> Like, if I were to blit it alone on the screen, nothing would be displayed.
>
> Transparency on loaded PNG's does work fine, but how can I make said
> surface?
>
> I'm sure this was asked before, but I Google'd and none of the solutions
> worked for me... :-/
>
> I tried SDL_SetAlpha(surf, 0, 0); but nothing... I fill the surface with
> (0,0,0,0).
>
> Thanks!
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>


More information about the SDL mailing list