[SDL] CVS Update (alpha blending)
slouken at devolution.com
Sun Apr 2 17:51:19 PDT 2000
> > do not convert them to the display format. If you convert an image,
> > you will lose the alpha channel information,
> I thought this was not supposed to happen...(and that it would get fixed in
> a future version) ?
Think about it for a minute:
You have 32-bit source images, and N-bit screen display.
For alpha blending you have to unpack the source pixels and destination
pixels and mix them together. It is much cheaper to unpack 32-bpp pixels
than it is to unpack N-bit pixels.
Therefore, computationaly it doesn't matter whether the source image is
32-bit or another format, and in fact since it's cheaper to unpack 32 bpp
pixels, it's actually faster if the source image is 32 bits per pixel.
I'm considering dropping alpha channel support for anything other than
32-bpp images, although per-surface alpha would still be avaialble.
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
More information about the SDL