I need to take a SDL_Surface object and convert it to
a 32bpp formatI know I can use SDL_ConvertSurface(…) to actually
convert the surface however I need to create and SDL_PixelFormat
object and I’m not sure how to populate it.
So assuming I have the variable:
SDL_PixelFormat pixFmt;
I would guess that pixFmt.pallette could be NULL (since it’s a 32bpp
surface)
pixFmt.BitsPerPixel = 32; // let us assume the surface is RGBA format
and
pixFmt.BytesPerPixel = 4;
but what about the Rloss, Rshift, Rmask (and their G and B cousins)?
I would guess that the colorkey and alpha could be 0 since I’m not going
to be using them.
-fjr--
Frank J. Ramsay
@Frank_Ramsay