View Full Version : drawing concave polygons
09-26-2004, 06:09 PM
I am in need of some advice on splitting concave polygons into convex polygons and then drawing them. The only code I can find for such things online is about tesselations. But i need some advice about how to do it without doing that, i was thinking of maybe doing something with the GL_TRIANGLE_FAN function maybe, but what I have so far doesn't work. Any advice / links would be appreciated.
09-26-2004, 11:25 PM
That is the only solution unless you want to use some external code outside OpenGL, the glu tesselator can convert your polygon to a triangle fan/strip and you can save it in a display list for later rendering for example.
09-27-2004, 10:28 AM
There is also an approach that will work with stencil but it is very brute force.
OpenGL does not really support concave polygon rendering well. This is a deliberate decision because it is an inherently expensive proposition. Forcing applications and developers to deal with the problem instead of providing them with an API to support bad practice for hardware design is the reason we have no easy concave polygon support.
09-27-2004, 01:39 PM
I'm just curios: is there a reason that tesselation is unacceptable?
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.