Do OpenGL polygons need to be convex?

BlitzMax Forums/OpenGL Module/Do OpenGL polygons need to be convex?

SofaKng(Posted 2007) [#1]
Do OpenGL polygons need to be convex?

It seems like I can draw CONCAVE polygons if I change the glPolygonMode to GL_LINE, but if I use GL_FILL then it forces my polygon to be convex.

Is this normal?

Thanks...


H&K(Posted 2007) [#2]
Yep.

Well..... I dont know about when you are deep into GL, (or DirectX), but Ive found that it works like that. What I do is have a "Shape" made from convex bits of shapes.
Its just max2d commands though. (And its only solid colours)
http://www.blitzbasic.com/Community/posts.php?topic=66251#740265


jhague(Posted 2007) [#3]
Correct, OpenGL polygons need to be convex. OpenGL really only knows how to draw lines, triangles, strips, and fans. Quads and convex polygons are just fans with different names.

There are glu utilities to tesseltate an arbitrary polygon into triangles.