Draw once, permanently, instead of every frame

So, I’m working on a small drawing app and it’s going to be working off a grid. The background grid will never change, just be scaled with the normal pinch/pull gestures. I was wondering if there’s a way to simply draw the grid once instead using up precious resources having to draw 1000’s of ofLines or vertex’s every frame. Thanks.

Got a similar issue, and used FBO’s to solve it.

You could draw the grid to an fbo (declared as global variable) in the setup() method; then just call fbo.draw() in the draw() method.

Thanks, this is one of those things I had no idea was in OF, but here it is http://www.openframeworks.cc/documentation/gl/ofFbo.html

I’ll give this shot.