I’m trying to render the scene to a FBO with stencil buffers included. I’ve attached a depth stencil (d24s8) render buffer to the FBO and when I get the render buffers stencil size I do get 8.
But the stenciling just doesn’t work.
It’s supposed to clear the stencil buffer to 0x0 and then draw a triangle filled with 0x1. It works when I render normally but refuses to work when I render to the FBO. The FBO check returns that the FBO is complete.
I clear the stencil with
I don’t know what else to try.
Is there some special way to write to the stencil buffer it I’m writing to a FBO?