[SDL] preparing a surface
stuart at linuxfreak.com
Sat Apr 22 18:13:55 PDT 2000
> I thought I could use SDL_CreateRGBSurface(), but, if so, obviously I'm
> using it wrong. If this is the function you use, how do you use
> it? (Specifically, what are you telling it by passing the RGB and A mask
> values... I thought this was a default fill color...)
That is the right function. The Bitmasks tell SDL which bits in each
pixel represent which color components. This is used mostly for 16bpp
displays where the mode may be 565, 555A, or some other variation.
Normally you just stick the screen's bitmasks back into these arguments
and everything works out OK. AFAIK SDL initializes surfaces to black.
Stuart Anderson -- echelon fodder follows
nuclear iraq bioweapon encryption cocaine korea terrorist NRA assassin
More information about the SDL