How to back-Culling in wireframe mode between meshes?

Hello,
I have a problem with back-culling in wireframe between meshes. This is I can do in opengl:

http://postimage.org/image/ve6w5k6u7/

But I want to like below:
http://postimage.org/image/fh848uefz/

Any suggestion?
Thanks for help!

Do a depth-only render with the objects being solid. You might need to add some depth-bias to the wireframe pass afterwards.

Or draw your geometry with special shader that emulates wireframe mode.

see this:

NVIDIA provided DirectX source code. Porting to OpenGL is trivial. Work pretty well for me.
The paper looks quite complicated but in the end it is just a few lines of code in geometry and fragment shader.