The lines were not drawn inside a depth aware framebuffer. Splitting the display into 2 draw pass fixes the issue.