Ogre3D is seeing an issue with FreeImage swapping the red and blue channels.
This problem was apparently introduced in 3.10 (3.9.3 worked), and persists through 3.12. http://www.ogre3d.org/forums/viewtopic.php?f=2&t=49326
Might want to ask ark42 why he introduced FREEIMAGE_COLORORDER in the first place... seems equivalent to FREEIMAGE_BIGENDIAN... just wanted a more descriptive name for what was being tested?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
your problem is linked to the FreeImage.h header file and the following #define :
// This really only affects 24 and 32 bit formats, the rest are always RGB order.
define FREEIMAGE_COLORORDER_BGR 0
define FREEIMAGE_COLORORDER_RGB 1
if defined(APPLE) || defined(FREEIMAGE_BIGENDIAN)
define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB
else
define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR
endif
I don't know how to check that you run an APPLE with a Little Endian processor ...
Can you try this :
if defined(APPLE) && defined(FREEIMAGE_BIGENDIAN)
and tell me if it works for you ?
Ah, thanks for tracking that down.
I don't think you should be testing APPLE at all as an indication of byte order. Intel macs are little endian, PowerPC macs are big endian.
So for instance, I tested that this gives an accurate report:
include <freeimage.h></freeimage.h>
include <stdio.h></stdio.h>
int main(int argc, char** argv) {
if defined(FREEIMAGE_BIGENDIAN)
else
endif
}
but if you add the '|| defined(APPLE)' it always picks big-end regardless of the actual host architecture...
I've fixed the FreeImage.h header file in the CVS by removing the APPLE #define
Might want to ask ark42 why he introduced FREEIMAGE_COLORORDER in the first place... seems equivalent to FREEIMAGE_BIGENDIAN... just wanted a more descriptive name for what was being tested?
see
https://sourceforge.net/forum/forum.php?thread_id=1775970&forum_id=36111
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).