glBlitFramebufferEXT and ATI cards

Hey guys,

do you also have problems with glBlitFramebufferEXT() and
Multisampling on ATI cards?

Using glBlitFramebufferEXT() to blit a multisampled color
renderbuffer from a FBO directly to the main window buffer
does not work. But it should work according to the spec.

And it works with NVidia graphic cards. A workaround on ATI
cards is to downsample the multisampled color buffer to a
singlesampled buffer and then blit the singlesampled buffer
to the main window.

If I try to blit the multisampled buffer directly…

Is the default framebuffer multisampled? Don’t forget: some drivers will force a multisampled framebuffer on you because the user selected a multisample option in the control panel.

The best way to deal with that is to check the default framebuffer before you create your FBO. If the default framebuffer is multisampled, then either just use it directly or create your textures/renderbuffers so that they have the same number of samples. Then your blit operation will work.

Multisampling is set to “application controlled” in the
control panel. And the main window framebuffer (I guess
that is what you mean with default framebuffer?) is
initialized by myself to the same sample count as the
FBO renderbuffers.

It works fine with my NVidia card but not with the ATI card.

Oh, so you’re not trying to downsample on the blit; you just want to copy it directly as-is.

First, verify that you’re getting the same number of samples by doing a GL query on the number of samples (ie: check to see that the driver isn’t giving you different numbers of samples). Unbind the FBO, do the query, then bind the FBO back and query again. If the FBO and the default framebuffer contain the same number of samples, the blit should work.

Then, if it still doesn’t work, you clearly have a bug. File a bug report on it.

Can you be so kind and post a short code snippet how to query
the FBO samples? I read the spec but… maybe I’m blind =/.
Thanks!

glGetIntegerv(GL_SAMPLES): retrieves a single integer representing the number of samples in the currently bound framebuffer.

Thanks! I compared the samples, both are 4 so it should work.