Line Antialiasing + Polygon offset

I asked this in the beg. forum but found no answer so I will try here. I have a problem when using polygon offset for hidden line and when I enable GL_LINE_SMOOTH.

While the lines are antialiased, there are two visual problems. 1) The wireframe overlay seems to be cut(like a cutting plane) by the near plane. That is the wireframe nearest to the viewer is not visible only the “hidden”/clear color polygon. This area changes as I rotate the model. Secondly, where the wireframe is visible, it is not longer hidden line. Instead, I can see the back sides of the model. So basically it looks like a plain wireframe.

As an additional example, if I set the color to blue of solid/not clear, black for wireframe I get the following.

1)The wireframe is “erased” as if a cutting plane(I am thinking the near plane) and all I see is blue. Where the wireframe is visible, I see black wireframe(AntiAliased) + blue solid + back sides.

This seems like a debth buffer problem. Only happens if I glEnable(GL_LINE_SMOOTH). Not blend or anything else. Just GL_LINE_SMOOTH causes this. Normal hidden line without AA works fine.

Any ideas. Thanks.


				glPolygonOffset( 1.0, 1.0 );
				glColor4fv( ccolor );//clear color
				glColor4fv( scolor ); //restore color messed

//up by vertex arrays