[SDL] Converting PNG's

Laurent Carlier lordheavym at gmail.com
Wed Aug 9 01:23:09 PDT 2006


Le mercredi 9 août 2006 09:44, Patricia Curtis a écrit :
> Hi
>    I have noticed that if i convert surfaces to screen->format, i get a
> huge increase in speed from my game, which works fine for the backgrounds.
>
> i am using PNG images for my sprites as they give me nice anti aliased
> edges but when i use SDL_ConvertSurface on the PNG's i lose my
> transparency's, so how can i convert the sprites to screen->format and
> still retain the transparency and the anti-aliasing on the edges?
> Many Thanks
>
> Trish

Perhaps you should use SDL_DisplayFormat or SDL_DisplayFormatAlpha to convert 
your sprites to display format.

Otherwise tou can enable alpha later with SDL_SetAlpha

++





More information about the SDL mailing list