DrawPoly and Concave

BlitzMax Forums/BlitzMax Beginners Area/DrawPoly and Concave

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The open gl driver uses the GL_POLYGON drawing mode to render the polygon. (ie. BM does not triangulate the polygon for you).

From the opengl redbook :-

"GL_POLYGON
Draws a polygon using the points v0, ... , vn-1 as vertices. n must be at least 3, or nothing is drawn. In addition, the polygon specified must not intersect itself and must be convex. If the vertices don't satisfy these conditions, the results are unpredictable. "

The d3d7 version draws the polygon as a triangle fan - which obviously doesn't supoprt concave shapes.

As you can see DrawPolygon only supports convex shapes. You will either have to find or write your own triangulator if you want concave polys.

Documentation update? (holds breath...)