I have followed this example to bridge Opencascade and QOpenGLWidget. A small difference is that I made some changes to the
OpenGl_FrameBufferand used my own FBO (built around QOpenGLFrameBuffer).
Because the purpose is to interop with native OpenGL stuff, the depth value is essential to mix different scenes (my own and opencascade). However, as shown below, the FBO from a box (built as below) in opencascade does not have depth values, all of them are 1 (white values). But the colors are correct.
TopoDS_Shape aBox = BRepPrimAPI_MakeBox(box.CornerMin(), box.CornerMax()).Shape(); occt_bounds_ = new AIS_Shape(aBox); occt_context_->Display(occt_bounds_, AIS_Shaded, 0, false);
The point clouds are bounded by the box, so they should be occluded as the figure.
How can I enable the writing of depth values for