I am displaying GL_QUADS as
But sometimes the lines do not look very pretty. Some times the lines are broken.
I do not know??
Did you enable blending?
Try also glHint(GL_LINE_SMOOTH_HINT, GL_NICEST) to ask for best quality (this is only a hint, it can be ignored by the implementation).