The GPU will happily swizzle the components for you.

The QuartzComposerOffline example uses:

glReadPixels(0, 0, width, height, GL_BGRA,GL_UNSIGNED_INT_8_8_8_8_REV, _scratchBufferPtr);

This causes an endian-reversed image on my Intel Leopard machine.

Changing GL_UNSIGNED_INT_8_8_8_8_REV to GL_UNSIGNED_INT_8_8_8_8 for little endian processors did the trick.
--
Kevin Packard
blackfrog software, inc.
http://blackfrog.com



On Apr 4, 2008, at 10:40 AM, [EMAIL PROTECTED] wrote:

My app uses QC to perform offscreen rendering. All works well with Tiger PPC or Intel and Leopard PPC.

However with Leopard Intel the colour components and alpha are mixed up.
The same thing happens with QuartzComposerOffline example code.
The Tiff files created by this app are also messed up.

I get QC to produce an NSImage whereas the QuartzComposerOffline example performs a gpu readback. Either way the alpha and colors appear to be in a weird order. (Not just reversed)

Before I write code to un-mangle it, does anyone have any ideas?

Thanks,

Adam


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/kevinpackard%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to