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.
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:
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.