Main Guidlines for fbo optimization

I have been using an fbo for the first time and I saw my framerate droping badly.

As @arturo says in [this][1] post it seems that “reading from the gpu memory is really slow”. So my CPU is free but my framerate drops painfully and machine is going crazy with the fans as soon as i turn it on… But actually I don’t think I’m reading pixels from the fbo, since I’m only calling:

fbo.begin()
   drawsomething()
fbo.end()
fbo.draw()

you can see the code [here][2]

I would like to have some guidelines to know how can I optimize it so that my machine does not complain too much :slight_smile:

I would like to do a list of the main things to take care of in order to use fbos in a reasonable way.

1- Drawing in the fbo (begin/end) only when necessary.
2- Size of the fbo (width/height)
3- Fbo pixel type (rgb,rgba, rgba32…)
4-…??

Drawing the fbo to screen (fbo.draw) every frame does not impact the performance. does it?
Does it make any sense to draw it to a texture and redrawing the texture to screen if the fbo has not been updated? or is this done internally?

Please anybody correct me if I’m wrong.

Some readings for beginners :
http://libcinder.org/docs/v0.8.5/guide_gl__fbo.html
[1]: FASTEST way of reading FBO pixels or screen pixels, please read!
[2]: https://github.com/wasawi/ofxUI/blob/example-ScrollBar/src/ofxUIScrollableSliderCanvas.cpp#L460