By the above code, i’m getting the border line. but the edges of the border line have inappropriate line caps. The lines end directly at the vertices. As a consequence with line widths > 1
there are visible gaps between the edges if the angle is <> 180 degrees.
Can you suggest me how to overcome this situation? is there any way to use square, circle or triangle cap like in Microsoft Windows GDI+.
One very dirty way would be to draw the polygon a bit enlarged, specifying the border color you want ( & disable for this the depth writes if necessary). Afterwards draw the polygon on top of it, at it’s normal size & color. & there you go, you have it!
hmmm, I have noticed this problem a long time ago, but it did not trouble me. Maybe you can draw vertices as points to make a kind of cap.
babis> I don’t think it is possible with your technique (or it is a bit complicated), you can do the same just drawing lines directly after drawing the mesh in fill mode and using a polygon offset. With GL_LINE_STIPPLE you can specify a line pattern.