Visible LINE(!) determination?


I want to know how to implement the visible

line(not surface) determination.

So the objects are drawn by the wiregrid

(mesh), but invisible lines are Not


How can I implement VLD?

Of course I can implement the visible

Surface determination via the depth test.

Please Help me!!

Draw the surface to the depth buffer but not the color buffer, then draw the lines. You probably will have to draw the surfaces using a nonzero polygon offset so that there is no z-fighting amongst the lines and surfaces (invisible though they are).

I need your advice precisely.

Thank you for explaining via code…