|
From: James W. W. <ja...@fr...> - 2006-03-16 18:30:27
|
"Sean McBride" <se...@ro...> wrote: >In any case, I have reproed the same bug that I see in our app! On a >PPC Mac or in Rosetta I see a triangle with R G B corners. On Intel I >see a blue triangle. See attached picture (only 10kb, I hope the list >allows it). > >So this is probably a Quesa bug. > >One idea I have is this sentence here: > ><http://developer.apple.com/documentation/MacOSX/Conceptual/ >universal_binary/universal_binary_tips/chapter_5_section_15.html> > >"By default, NewGWorld always creates big-endian pixel formats >(k16BE555PixelFormat or k32ARGBPixelFormat), regardless of the endian >format of the system." > >Maybe Quesa is incorrectly assuming that its gworlds have the same >endianess as the host system? > >But that's just a guess... I asked about this on the Mac OpenGL mailing list, and it is an endian issue. As you say, NewGWorld is treating the bytes as xRGB order, whereas OpenGL on Intel uses BGRA order. Background Test could be fixed without changing Quesa by flipping the bytes of each pixel before and after each render. Presumably this could be done inside Quesa instead. The structure that defines a pixmap draw context has a byte order field, which we don't seem to use at present. -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |