[SDL] does endian-ness matter?
Tom Wilson
t.wilson at hazid.com
Thu Jul 21 12:05:44 PDT 2005
atform.
>
> If this is correct, then why the need for different RGBA masks in the SDL for
> BIG and LIL endian platforms? If anyone could point me at a reference, or
> is willing to explain how this really works to me, I would greatly appreciate
> the enlightenment. This is quite a big hole in my education that I'd like to
> fill.
>
endian-ness *DOES* matter. The compiler is not really a concern as it
converts any numbers you type in to the correct endian.
The main area where you will have problems is with binary files. For
example if you use "fwrite" to write a 'float' to a file on a little
endian machine. Then you use "fread" on the big-endian machine to read
the file back in, the bytes will be read in in the wrong order.
- Tom
More information about the SDL
mailing list