Draw edges / get coordinates

I am trying to build a simple Preprocessor for finite element structures. One problem I have is to draw the edges of the elements. I am creating a list with GL_POLYGON, then a list with GL_LINES. When I display them together, the lines are somtimes partially hidden.

The next problem is to reference nodes or elements with the mouse. I can get the mouse position, but I am not able to get the screen coordinates of my vertices.

Does anybody know how to solve these problems?

You didn’t make it very clear, but I think you are trying to draw polygons, and then accentuate the edges in a different color.
If you want the lines to show reliably, you need to offset them slightly using something like:

glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(10,10);

On this topic, does anybody know why enable line antialiasing cause visual problems with polygon offset. I seem to get this effect that when both are on, as I rotate the object, a portion of offset lines/wireframe is culled.

Thanks for the hint with PolygonOffset, that’s what I needed.

Can anybody help me with my second problem, how to pick nodes/elements from the screen?