Haloing lines can make it easier to understand a wireframe drawing. Lines that pass behind other lines stop short a little before passing behind. It makes it clearer which line is in front of the other.
Haloed lines can be drawn using the depth buffer. The technique has two passes. First disable writing to the color buffer; the first pass only updates the depth buffer. Set the line width to be greater than the normal line width you're using. The width you choose will determine the extent of the halos. Render the lines. Now set the line width back to normal, and enable writing to the color buffer. Render the lines again. Each line will be bordered on both sides by a wider ``invisible line'' in the depth buffer. This wider line will mask out other lines as they pass beneath it.
This method will not work where multiple lines with the same depth meet. Instead of connecting, all of the lines will be ``blocked'' by the last wide line drawn. There can also be depth buffer aliasing problems when the wide line z values are changed by another wide line crossing it. This effect becomes more pronounced if the narrow lines are widened to improve image clarity.
To avoid this problem, use polygon offset to move narrower visible lines in front of the obscuring lines when the lines are being drawn as polygons in line mode. The minimum offset should be used to avoid lines from one surface of the object ``popping through'' the lines of a another surface separated by only a small depth value.
If the vertices of the object's faces are oriented to allow face culling, then face culling can be used to sort the object surfaces and allow a more robust technique: the lines of the object's back faces are drawn, then obscuring wide lines of the front face are drawn, then finally the narrow lines of the front face are drawn. No special depth buffer techniques are needed.
Since the depth buffer isn't needed, there are no depth aliasing problems. The backface culling technique is fast and works well, but is not general. It won't work for multiple obscuring or intersecting objects.