Using the z-depth buffer when drawing from bgl draw callbacks?
Ok I have found one way of doing this.

bgl.glEnable(bgl.GL_DEPTH_TEST)
bgl.glDepthRange (0.0, 0.9);

# Draw "Something" here

bgl.glDepthRange (0.1, 1.0)

# Anything drawn now will be below "Something" drawn above

# restore opengl defaults

bgl.glLineWidth(1)
bgl.glDisable(bgl.GL_DEPTH_TEST)
bgl.glDisable(bgl.GL_BLEND)