FBO multisampling & z-buffering.

Anyone have any idea if multisampling is on the radar for Framebuffer Objects?

Also, for whatever reason, z-buffering (and stenciling) is disabled whilst rendering to the bound FBO. why is that? it’s enabled after I bind the FBO. What am I missing?

Thanks.

When you render to an FBO you render to a full and distinct buffer. If you were meaning that stencil and z-buffer of the default buffer is disabled, it’s then fully normal just because when an FBO is bound it is rendered inside this FBO, letting the default buffers free (not filling them).

If you want to do that inside your FBO you’ll have to make a compatible FBO (with zbuffer activated and/or with stencil activated). [I’m not sure both work together now]. Check for FBO attachments in the specs, that will light you, also check the examples, they are easy to understand.

Yes, but the thing is that I have attached a GL_DEPTH_COMPONENT24 to the renderbuffer. I’m not sure if that’s necessary for having z-buffering work though…

Regardless, it’s there…just z-buffering is somehow disabled and I can’t figure out for the life of me how to enable it.

Did you read my last part (about reading the specs) ?

Also, and as far as I know, making such things to work seems a bit tricky and could depend on the drivers version. But generally yes, using a renderbuffer object along with an FBO should suffice for it to work. Also look at previous posts about that (specially mine :slight_smile: , and also specially about how to check that FBO is valid. It helps much.

Hope that helps.