Ysaneya
01-31-2008, 03:36 PM
Hi all,
Using FBO alone is easy. Performing multisample antialiasing on a FP16 target is a bit harder. The procedure I'm using is:
- Create FBO A, attach the renderable texture to COLOR_ATTACHEMENT_0, attach a depth buffer.
- Create FBO B, attach a multisample render buffer to COLOR_ATTACHMENT_0, attach a multisample depth buffer.
- Render scene into FBO B
- Blit FBO B into FBO A
Now, my problem is that I want to use multiple FP16 render buffers AND antialiasing at the same time.
I felt that the procedure above should work "as is", ie. with a single blit, the two color attachments get copied. Doesn't seem that way. When I try to display the second color attachment, I get the data from the first one.
There's not a single word in the specifications about mixing ARB_draw_buffers with EXT_framebuffer_multisample/blit.
I tried a slightly different approach. Instead of a single blit, I do:
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_fboB);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fboA);
- glReadBuffer(GL_COLOR_ATTACHMENT0_EXT)
- glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
- glBlitFramebufferEXT(0, 0, m_width - 1, m_height - 1, 0, 0, m_width - 1, m_height - 1, mask, GL_NEAREST);
- glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glBlitFramebufferEXT(0, 0, m_width - 1, m_height - 1, 0, 0, m_width - 1, m_height - 1, mask, GL_NEAREST);
I check for glGetError between each call, and no error happens. But the end result (when displaying the secondary texture) is still showing the first texture's content.
I have a GF 8800 GTX under Vista 32 bits.
Did anybody succeed in mixing those extensions together ? Or has any idea ?
Y.
Using FBO alone is easy. Performing multisample antialiasing on a FP16 target is a bit harder. The procedure I'm using is:
- Create FBO A, attach the renderable texture to COLOR_ATTACHEMENT_0, attach a depth buffer.
- Create FBO B, attach a multisample render buffer to COLOR_ATTACHMENT_0, attach a multisample depth buffer.
- Render scene into FBO B
- Blit FBO B into FBO A
Now, my problem is that I want to use multiple FP16 render buffers AND antialiasing at the same time.
I felt that the procedure above should work "as is", ie. with a single blit, the two color attachments get copied. Doesn't seem that way. When I try to display the second color attachment, I get the data from the first one.
There's not a single word in the specifications about mixing ARB_draw_buffers with EXT_framebuffer_multisample/blit.
I tried a slightly different approach. Instead of a single blit, I do:
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_fboB);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fboA);
- glReadBuffer(GL_COLOR_ATTACHMENT0_EXT)
- glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
- glBlitFramebufferEXT(0, 0, m_width - 1, m_height - 1, 0, 0, m_width - 1, m_height - 1, mask, GL_NEAREST);
- glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glBlitFramebufferEXT(0, 0, m_width - 1, m_height - 1, 0, 0, m_width - 1, m_height - 1, mask, GL_NEAREST);
I check for glGetError between each call, and no error happens. But the end result (when displaying the secondary texture) is still showing the first texture's content.
I have a GF 8800 GTX under Vista 32 bits.
Did anybody succeed in mixing those extensions together ? Or has any idea ?
Y.