Polygon Offset will do that (sample code). Remember that you must enable GL_POLYGON_OFFSET_LINE
in addition to calling glPolygonOffset
(as explained on the linked manpage).
If these are actually drawn using GL_LINES
, then as pointed out by Andon M. Coleman, this will not work. In that case, use glDepthRange
to a similar (almost identical effect).
How to do that is explained on the OpenGL FAQ #13.050.