I am using the following code to retrieve pixels from a ccsprite
texture~~>beginWithClear; // pink background
glReadPixels(0, 0, renderTextureWidth, renderTextureHeight, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
Notice the underlined line~~ it is there for testing purposes to check whether the bytes were successfully read.
This works fine when I test it on the windows (vs2010) but when I compile it with cygwin and run it on android the image is distorted completely as if glReadPixels did not work properly. Please see screenshots below:
The screenshot below was taken from android (I took a photo with another phone - please pardon the quality):
win.png (27.7 KB)