bad quality results

Hello, I am writing a 3Dworld viewer, and I get low quality render.

I draw the lines with glBegin()/glEnd() funtions. My Near/Far rates are about 0.01.

If I enable GL_STENCIL_TEST or GL_ALPHA_TEST the results are fine, but it is very slowly.

How can I resolve this problem?
thank you very much.