|
This thread is locked; no one can reply to it. |
1
2
|
No red, only green and blue! |
boulifb
Member #7,909
October 2006
|
ok, I'll do a sample project that will run on both Mac OS X (via XCode) and Windows (via VS2005) tomorrow morning and post it as soon as possible. Of course, to reflect the error, poeple will need a mac intel. Maybe there is a problem in Allegro in detecting little endian and big endian on Mac OS X. It happens only on this system. Best regards. Fred |
Evert
Member #794
November 2000
|
Nevermind, try the following program:
If that gives you the proper output on both systems (you'll need to change the number at the top) the problem is elsewhere. |
boulifb
Member #7,909
October 2006
|
Hi, I have the correct values: I have seen this: where it says that values must be encoded in big endian when running on Mac OS no matter it is intel or ppc processors. My project maybe gives a perfect illustration of the big endian/little endian. But... But... but... |
Evert
Member #794
November 2000
|
Bit operations on integers do not depend on endianess, so the same code should work on each platform. |
boulifb
Member #7,909
October 2006
|
After deeper tests, I have tested with the 15 bits color 0x7249 which is an aquarel blue. I have used the RGB coding and I get an aquarel orange. It's maybe due to the Big Endian encoding of Mac OS X. |
Evert
Member #794
November 2000
|
I don't understand what you mean. Quote: While I have taken the 15bits values from Windows which is little endian encoded, when I use them on Mac OS X, it reverses the composites. I don't understand. What do you mean? Quote: That's the only explanation I have. You lost me. Are you seeing a problem with my example program, or yours? How are you reading in the colour components? Are they hard-coded, or do you read them from disk? EDIT: for the record, the code I posted produces identical results on my PC (running Linux) and my laptop (a G4 iBook). |
boulifb
Member #7,909
October 2006
|
I see a problem with your sample too: use the color I told you (0x7249) I have read the color values on a game boy emulator that runs under windows. |
|
1
2
|