Rendering nonconvex polygons?

Started by
2 comments, last by mjs2000 19 years, 4 months ago
For the 2D top-down game I'm working on, I'm going to have to render arbitrary, "nonconvex" polygons (like "T"s and polygons with indentations). OpenGL doesn't like polygons like that...what's the cheapest way to get this to work? (I'm assuming you have to subdivide the polygon into convex shapes--where can I find an algorithm (or built-in OpenGL function?) for that?) -matt
Advertisement
This may be helpful.

Oh and nonconvex polygons are generally known as concave polygons.
gluTess* does what you want, but it's slow so for anything realtime you'll want to cache the output.

-Morten-
Thanks. I thought GLU had tessellation functions, but I've been away and haven't had my Redbook on hand.

-matt

This topic is closed to new replies.

Advertisement