PDA

View Full Version : drawing outerlines for concave polygons



bhogasena
01-29-2009, 05:46 AM
hi,
i rendered the filled concave polygons by tesselation.now i have to draw outerlines for those filled polygons. can any one help me for this, so that i'll be thankful to you.
thanks and regards
k.bhogasena reddy

Brolingstanz
01-29-2009, 08:29 AM
On Windows, check out wglUseFontOutlines. I think it uses one of the "plane sweep" algorithms to triangulate the contours.

Or maybe have a look at one of the (platform neutral) font generation/rendering libraries out there. I've seen several mentioned in recent threads.

Hope it helps.

wedge
02-02-2009, 10:24 AM
Use GL_LINE_LOOP with the original Polygon Points?

-Ekh-
02-02-2009, 01:32 PM
I would draw the polygon twice. The first time in the normal way and the second time, using glPolygonMode (GL_LINES) and with using wider lines (I think with using glPointSize).

wedge
02-03-2009, 05:35 AM
Hm ok whats wrong here ... ;)
> using glPolygonMode (GL_LINES)
> using glPointSize
use LineWith and this can also be a solution BUT
you also draw the triangeles inside the polygon. But if you use Z-Buffer and polygonoffset you can remove the "wrong" lines inside ...