OpenGL GL_POLYGON concave polygon doesn’t color in

GL_POLYGON is only for convex polygons:

GL_POLYGON: Draws a single, convex polygon. Vertices 1 through N define this polygon.

For concave polygons you have at least two options:

  1. Triangulate the polygon and use GL_TRIANGLES.

  2. Use the stencil buffer trick.

Leave a Comment