thomas at moderngroove.com
Tue Apr 17 11:50:10 PDT 2001
> Thing is, I correctly read the 32bpp TGA files - that is, I get
>all the pixel components right, and use SDL_MapRGBA to fill in the image
>buffer. I then use SDL_CreateRGBSurfaceFrom to create the SDL surface.
>Well, if I call SDL_SetAlpha for that surface, the entire surface gets
>affected, instead of a per-pixel effect. Any pointers here? BTW, the
>SDL_CreateRGBSurfaceFrom is being called with all the color masks set to
If you pass 0 as the colour masks in calls to SDL_CreateRGBSurface[From]
then some default masks will be used with no alpha channel (Amask=0).
In general, *always* specify the colour masks for non-palettized surfaces
the TGA loader will create surfaces with an alpha channel if and only if
the file had an alpha channel
The per-surface alpha will only be used if the surface doesn't have an
More information about the SDL