I am implementing Framebuffer Object Multisample. And I have it working for the most part. I have one sticking point currently.
I have a color attachment on COLOR_ATTACHMENT0, another on COLOR_ATTACHMENT1, as well as depth and stencil (via DEPTH_STENCIL Extension). My shader (Cg) outputs to both COLOR0 and COLOR1, this works fine for my non-multisample FBO. When I do my BlitFramebuffer call, should it be copying all of the color attachments from the source FBO to the dest FBO? Everything works but the 2nd render target. Certainly I could have something wrong, so any comments are welcome.
Basically, I have 2 FBOs, 1 setup with 2 texture attachments, and 1 setup with multisample render buffers.
Here’s the Blit code.
glBindFramebuffer( GL_DRAW_FRAMEBUFFER_EXT, _fbo ); glBindFramebuffer( GL_READ_FRAMEBUFFER_EXT, _fbo_multisample ); glBlitFramebuffer(0, 0, _rb_size_x, _rb_size_y, 0, 0, _rb_size_x, _rb_size_y, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);