From Aurelien Albert, "In the "apply" method of osg::FrameBufferObject, the draw buffers are always enabled, even if the target is only "READ_FRAMEBUFFER".

This can lead to inconsistency if you bind a framebuffer with multiple attachments in DRAW mode and then a framebuffer with different attachment count in READ mode (for example to manually "blit" from a FBo to another).

On some ATI cards (at least RADEON HD) this also leads to an "incomplete " FBO status

I've added a test to enable drawbuffers only if target is "DRAW" or "READ_DRAW", this solves my problems on ATI cards."