[SDL] Weird surface behavior

Ti Leggett leggett at eecs.tulane.edu
Wed Aug 22 06:24:01 PDT 2001

On 2001.08.22 01:44 Adam Gates wrote:
> You may be right on the other points, I'm not sure I'm just giving
> ideas, but your last point about the pixel size is definately wrong.
> GetRGB and GetRGBA both return Uint32 because all pixels will fit into
> an Uint32 but in the pixel array the are packed according to the Bytes
> Per Pixel (bpp) value.

I'll buy that, but is it wrong then to just copy that data over as a Uint32
then? If so, how should I go about doing a pixel by pixel copy? I tried, at
one point doing a GetRGBA from color_map and then a SetRGBA to surface but
that bombed harder (I'm sure due to my using them wrong).

Ti Leggett
leggett at eecs.tulane.edu

More information about the SDL mailing list