I´m using ogre 1.8.0 for iOS, and "copyContentsToMemory" method in my code to generate a screenshoot. It works perfectly in an iPhone 3GS with iOS 5, but is returning a buffer full of '/0's when running it on iPhone 4 with iOS 6.
Here is a fragment of the code:
Code: Select all
unsigned char *data = new unsigned char [outWidth*outHeight*outBytesPerPixel];
memset(data, 0, outWidth*outHeight*outBytesPerPixel);
Ogre::Box extents(left, top, left + width, top + height);
Ogre::PixelBox pb(extents, format, data);
m_pOgreRenderWnd->copyContentsToMemory(pb, Ogre::RenderTarget::FB_FRONT);
Any idea about what´s happening or alternative to this method to get it working in iOS 6 ?
Thanks in advance.