I'm trying to compute the "projected" 3D position of the mouse when it's hovering graphical objects (eg AIS_Shape). To this end I'm trying to use the depth buffer as explained in this article (though I'm concerned only with the orthographic case).
To retrieve the depth buffer I'm calling V3d_View::ToPixMap() and pass Graphic3d_BT_Depth as the buffer type, but I always get an empty "image" containing only the trihedron (enabled in the view with V3d_View::TriedronDisplay()).
To view the contents of the depth buffer image I convert from "4bytes float grayscale" to a Qt's QImage with format QImage::Format_Grayscale8. See the attached picture for example.
Is retrieval of the depth buffer from V3d_View supposed to work ? Have anyone already used this ?