[SDL] PNG Transparency (other image formats too)

mal content artifact.one at googlemail.com
Thu Sep 28 13:55:14 PDT 2006


On 28/09/06, Laurent Carlier <lordheavy at infonie.fr> wrote:
>
> Check for the SDL_SRCALPHA flag of the loaded surface :-)
>
> something like :
>
> if (surface->flags & SDL_SRCALPHA)
>   surface = SDL_DisplayFormatAlpha(surface);
> else
>   surface = SDL_DisplayFormat(surface);
>

AHA!

Well that's me sorted out then, thanks!

MC




More information about the SDL mailing list