PDA

View Full Version : To Display Concave polygons & polygon containing holes



deepa
10-14-2004, 12:23 AM
Dear OpenGL Experts,

I am creating application, which requires the display of concave polygons, polygons containing holes and polygons intersecting edges.
How can I get this?

Please write to me at dnomula@yahoo.co.in

Deepa S. Nomula
Software Consultant,
Navi Mumbai.

dorbie
10-14-2004, 10:59 AM
Your software really needs to subdivide.

You could draw individual triangles and use stencil operatiosn but that's really inefficient.

Current hardware is not really designed to handle your problem well.

Stephen_H
10-14-2004, 01:16 PM
If your polygons aren't transparent, you'll need to tesselate your polygons into triangles using something like the GLU polygon tesselator and then render the triangles. The zbuffer will automatically take care of intersecting polygons.

If your polygons are possibly transparent, then in addition to tesselating them, you'll also have to clip & sort them, and things get a whole lot more complicated...