Ah, yeah you’re rendering into a RenderTexture frame buffer, but then calling glReadPixels on the screen frame buffer. Try setting the background of the scene to green or something (so that you can see it display green when you run the game.
If the RenderTexture is being output already because you’ve added it into the scene, then you should see red being displayed (now that you updated the clear color).
You can look at ccUtils.cpp to see how glReadPixels used for capturing the screen.
You may still need to wait for the next frame (or longer) which is what captureScreen/onScreenCaptured does in ccUtils.cpp. It looks like they use the event Director::EVENT_AFTER_DRAW and add a callback that reads the pixels when that event has been signaled.
There’s other discussions of issues. One even about a chipset (specific android devices) that may or may not support this command.
Here’s discussion about reading pixel for touch testing:
Pixel perfect touch or how to determine if a pixel of a sprite is transparent .