[SDL] changing alpha-masks
Alex Volkov
avcp-sdlmail at usa.net
Wed Dec 7 11:51:44 PST 2005
Stefan Gulan wrote:
> So SDL_DisplayFormatAlpha() doesn't give the alpha-mask/shift _of_
> the dislplay surface but the format of the display surf. _plus_
> an alpha-mask ?
Neither, actually. SDL_DisplayFormatAlpha() does this -->
* This function takes a surface and copies it to a new surface of the
* pixel format and colors of the video framebuffer (if possible),
* suitable for fast alpha blitting onto the display surface.
That "if possible" makes the difference. In reality, it is only "possible"
when the video framebuffer is in 24bpp or 32bpp mode, or at least, that is
the current implementation. Currently, the returned surface is always 32bpp,
and the reason for such is suitability "for fast alpha blitting onto the
display surface", because there are no other fast blitters present.
SDL_DisplayFormatAlpha() tries to arrange the RGB channels in the same order
as the display surface has them to make blits faster.
Unfortunately, I do not know a whole lot about glSDL to help you otherwise.
More information about the SDL
mailing list