View Full Version : drawing outerlines for concave polygons
01-29-2009, 05:46 AM
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
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.
02-02-2009, 10:24 AM
Use GL_LINE_LOOP with the original Polygon Points?
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).
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 ...
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.