I would like to display some shaded box (opaque) with text inside it.
I have a custom AIS_InteractiveObject for this task.
The problem is that when I set the layer of the object to Graphic3d_ZLayerId_TopOSD, all the primitive I use to compose this object seems to be on the same depth. I tried playing with Graphic3d_Structure::SetDisplayPriority() (putting the text in it's own group as well as the triangles), with Graphic3d_Aspects::SetPolygonOffsets() and with Graphic3d_Text::SetPosition() by trying to put the Graphic3d_Text in front of the Graphic3d_ArrayOfTriangles but it's not working if I put the object on Graphic3d_ZLayerId_TopOSD layer.
The same custom object works fine if I use the Graphic3d_ZLayerId_Topmost layer. Currently, the onl;y way I got it working on the Graphic3d_ZLayerId_TopOSD layer was to put some transparency on the triangles, but the text part is not as clear as I want in that case and in some case the text get lost in the 3D model.
Is there a way to get what I want?