MSAA FBO

Hi!

Has anyone managed to get MSAA working with stencil buffers
in FBO mode? This is my really simple FBO setup:
Color attachment - 1x 2D texture (GL_RGBA)
Depth + Stencil - 1x renderbuffer (GL_DEPTH24_STENCIL8)

I’ve made 2 calls to glFramebufferRenderbuffer() to
attach the depth and stencil buffers separately.
I’ve also called glRenderbufferStorageMultisample()
for the depth+stencil renderbuffer. The end result
is no MSAA: any ideas?

.rex

I’ve made 2 calls to glFramebufferRenderbuffer() to
attach the depth and stencil buffers separately.

That’s probably your problem. Use one buffer with a GL_DEPTH_STENCIL format, rather than a separate DEPTH_COMPONENT and STENCIL_COMPONENT.

That’s what I did. But because GL_DEPTH_STENCIL_ATTACHMENT
is not available on OSX (GL 2.0), I’ve had to make 2 calls
to glFramebufferRenderbuffer to bind them separately.
I checked and GL_DEPTH_STENCIL_ATTACHMENT is inside GL3.h
so it’s not available in GL 2.0. However, I’m able to get
MSAA when using stencil buffers with the standard framebuffer,
so I know the h/w functionality is there.

.rex