PixelFormat enumeration is possibly incorrect?

Kodachi_Garou

26-10-2007 09:55:49

Hi all,

While carefully gleaning through the PixelFormat enum, I found a dangerous inconsistency which I couldn't tell whether it was from the Mogre wrapper or from Ogre itself. This is the relevant excerpt:

PF_BYTE_BGR = 10,
PF_R8G8B8 = 10,
PF_B8G8R8 = 11,
PF_BYTE_RGB = 11,


As you can see the synonyms are broken: BGR corresponds to R8G8B8 and RGB to B8G8R8.

Can anyone confirm this? Its dangerous especially since there's two of each so one can't tell which one is the correct one.

Best regards,

Gonçalo

Kodachi_Garou

26-10-2007 10:06:42

On further look, I find that apparently this is how it should be. The enum is consistent with Ogre's own enum, and the switch happens in pixelformats with greater number of channels as well.

I still don't get why the channel order changes though. Makes it a bit unintuitive. But apparently everything checks out.

Sorry for the false alarm.