Line breaking

I have a qustion. I want to make a wireframe box in openGL, and need the back lines to be ‘broken’ by the front lines.
Here is an image showing what I mean.

I don’t need actual code to do it, as much as an explanation of how to do it. I know that I need to use depth testing with some wide clear lines, but am not sure how. Any help at all is greatly appreciated. Thanks!

Eric

im not certain if this’ll work
but u could render the box with thicker white lines and then render after wards with thinner black lines.
make sure the depth test is set to LEQUAL