I’m having an issue with the depthBuffer in ofFBO. When I draw to the screen, the depth of all of my objects are rendered correctly. When I draw the scene into an ofFBO, the depth buffer isn’t enabled the polygons are all stacked in the order they are drawn in the loop, not their correct order in z-space.
Enabling the depth buffer through allocate() displays a grey screen the app runs but nothing is rendered to the screen (FBO or anything else).
ofFbo::Settings settings; settings.width = 512; settings.height = 512; settings.internalformat = GL_RGB; settings.numSamples = 0; settings.useDepth = true; settings.useStencil = false; screenFBO.allocate(settings);
It looks as though the stencil buffer in ofFBO has been solved in another thread does anyone have any ideas on how to fix the depth buffer?
Thanks in advance,