Possible to enable depth buffer for openGL painter?
-
I would like to be able to draw UI components at the beginning of a QOpenGLWidget scene and have it affect the depth buffer so fragment shader operations can be rejected under the UI components. I went through a bit of the source and if I'm getting it right the openGL paint engine disables the depth buffer but does use the stencil buffer. As is it appears it is meant to draw on top of what is already there.
The only idea I have so far is if the stencil buffer is still intact after the 2d painting I could extract it and set the depth buffer as appropriate.