Bring to front

I am drawing some lines as topmost using SetZLayer(Graphic3d_ZLayerId_Topmost)

It is displayed on top of all other objects but i want some other objects to bring front, so topmost lines will not be on top of these objects.

Is that possible?

I tried to change DisplayPriority but didnt work.

Kirill Gavrilov's picture

The description is unclear, but you may always define your own Z-Layers to achieve desired sorting if number of standard Z-Layers is not enough (see V3d_Viewer::InsertLayerBefore()/::InsertLayerAfter()).

Kadir Canik's picture

Dear Kiril,

Thanks for answer.

I attached a picture, i was mean the green lines are topmost, so seen always.

What i want is the blue shape will be top of these lines, as you can see the blue shape is not hiding the lines.

Best regards.

Attachments: 
Kirill Gavrilov's picture

So you need putting a blue shape into the same Z-Layer as lines (presentation priorities take effect within the same layer) or to Z-Layer above of lines (like Graphic3d_ZLayerId_TopOSD above Graphic3d_ZLayerId_Topmost).

It should be noticed, though, that Graphic3d_ZLayerId_TopOSD disables a depth test - but you may enable it if needed or insert your own Z-Layer in-between.