FBO switching

I need to render several objects into textures of different sizes. At a single time, only one texture is attached to the FBO. Do all the textures still have to be of the same size?

I have been using multiple FBOs (one each for a single texture size) but I know texture-switching on an FBO is faster than FBO switching, which is why I am looking into using a single FBO if possible.

FBO can have different-size attachments. In case of rendering to them at once, the common sub-rectangle is chosen, iirc.

Not necesesarily. See this thread. Then time both on your system and see.

but I know texture-switching on an FBO is faster than FBO switching,

Where do you know this from? I remember one presentation from 2005(!)which introduced the back-then-brand-new-feature. Indeed it told, switching FBO were slower than re-attaching textures. I consider this information outdated and wrong.

FBO’s were introduced for a specific purpose, to be able to validate the completeness of it (i.e. the complex state it captures) quickly. If you don’t change a ‘complete’ FBO, its completeness can be evaluated very fast. Switching between ‘complete’ FBOs should be very quick this way, since almost no validation needs to be done.
Changing attachments of FBOs causes a new validation of the completeness which can be (according to the EXT_fbo specs) heavy.
So, how should switching between FBOs be slower than reattaching textures to them?

^I was basing my knowledge on precisely that old and outdated presentation by Simon Green. Its a pity that the particular presentation in question is the only ‘official’ reference on the subject.

Anyway, looks like I might just stick to FBO switching for now. I’ll benchmark the two approaches when I have the time.

No problem with using FBOs. And prior to benching, I’d suggest that you allocate one FBO per texture res+format combination.