Is it possible to attach color attachments to the “default” framebuffer?
The effect would be that writes to gl_FragColor or gl_FragData[0] would directly go to the screen, and writes to gl_FragData[1 … 7] would go the the color attachments.
I have code that does all of that with a separate FBO, but then I always need to copy the first color attachment back to the screen, which seems wasteful.
No, this is not possible. The attachments of the default framebuffer are not exposed as renderbuffers or textures and you cannot attach any more color attachments to the default framebuffer.
Though, it is possible in hardware, but the OpenGL specification does not support it, neither the implementations. Actually, this is something that I’m waiting for a long time to be included in the specification.
Another classic scenario where you wouldn’t blit is shadow mapping (or any render to texture technique). The algorithm in this case would be:
a) create FBO and attach a depth texture as DEPTH_ATTACHMENT
b) bind FBO and render z-only pass for the light source
c) render scene and use the depth attachment as depth texture