grabScreen for iphone

hello forum.

I tried using grabScreen on the iPhone but it seems to be not working.
I used the same code on my laptop and it worked fine.

I am drawing a bunch of lines on top of a background image and every so often I want to grab what is on the screen and make that the new background image.

An an alternative I am using ofTexture and write my lines (point by point) in to a pixels array and than say

texBG.loadData(bgPixels, ofGetWidth(),ofGetHeight(), GL_RGBA);

But here i don’t know how to write a whole line or shape to the texture.

any ideas?

thank you and happy holidays,

ok i found a way of capturing the screen.

make a texture, allocate space, and than when ever i want to get the screen data i do


than draw the texture.

there is probably a way of using grabScreen , since in the ofImage.cpp code does mention the iPhone.

in any case.

happy new year,