getPixels from FBO on iPhone

I posted this question in another really long thread about ofxFBOtexture, but I think its a bit buried so I’m creating a new thread…

Basically I can find two versions right now, the one on the addons page and this one

http://forum.openframeworks.cc/t/ofxfbotexture/3143/0

Both of which run on the iPhone/GLES pretty well so far with one exception…

The first one just ignores any refernce to getPixels() and the second does not work on the iPhone because of getPixels(), namely the readBuffer() function. I can comment this out and run it but then it doesn’t allow me to get pixels.

I need to draw to an FBO then copy the fbo into either a texture or an ofImage (i’d rather it be an ofImage). I would just copy the texture data but that isn’t allowed in OF by copy constructors, I assume for a good reason…

Right now the best way I could find was running grabScreen from an ofImage while in the FBO, the coordinates seem to be off (probably because OF is using top left instead of bottom left) but otherwise it works OK I think, but it just feels like a bit of a sloppy hack.

Any suggestions? I think what I need is a GLES equivalent of readBuffer() in order for this to work.

Also, the one that does have getPixels() defined returns them as a void* vs an unsigned char *, is there a reason for this?

Any help would be super appreciated…

-Steve