I’m hoping this isn’t ‘Advanced’!
I’m writing a CAD/CAM application.
I want to prioritise the render order and I’m pretty sure that glPolygonOffset isn’t the answer.
Imagine a solid model cylinder being rendered with facets for the faces and thick lines for the edges; the user selects the curved face on the cylinder and asks for a Surface Object to be created from it. The Surface Object will be Z-fighting the Solid Model and the Edges will be fighting the Faces. Additionally, they may want the edges of the cube to be turned into Line Objects. There are many other depth-types too.
I need the Lines to be visible over the Surface Object and the Surface to be visible over Solid Model Edges and the Solid Model Edges to be visible over the Solid Model Faces when they are at the same Depth-Z.
This isn’t a Depth-Buffer problem, I don’t want to see through anything.
I had some success with glPolygonOffset but there must be a simpler way. I can’t use it for the final release because it breaks the rendering of the solid models (faces vanish near the edges).
Thanks for any help!