DiscussionsIssue archiveVisualization and 3D Viewer

Archived discussion

Bring to front with selection

Visualization and 3D ViewerTue, 03/22/2016 - 15:311 reply

Browse this forum
QuestionAuthor

Hello,

Is there a way to bring an object to the front while also maintaining the ability of selection of that object?

You can use Z-layers but they are only for graphical presentation, not selection. 

Maybe I could put some opengl depth testing code inside PrsMgr_ PresentableObject::Compute. 

Thanks

Discussion

1 archived reply

Posts are displayed in their archived order.

01Author

So it turns out you can use userdraw and add glDisable (GL_DEPTH_TEST) in the render method and the object is always drawn on top.

However you must set the display priority of the object being drawn on top to highest so it is drawn last.

Selection does work BUT the section behind another object is not selectable. I tried setting the selection priority which has no effect. To fix this simple use StdSelect_ViewerSelector3d.