Hello all,
I've added some functions that allow ENIGMA to draw complex (self-intersecting) polygons. For example:

Since this is my first contributed feature --and it's really important to me not to step on the other developers' toes-- I decided to post here for feedback before I make a pull request. The code is available here:
https://github.com/sorlok/enigma-dev/tree/draw_polygon
Discussion is welcome, but please specify if any issues you have are deal-breaking issues. Everyone has different best practices, and I will try to accommodate your suggestions, but I have other features I'd like to work on too if there are no critical mistakes.
In particular, here are some potential issues, none of which I consider deal-breaking. Please let me know what you think:
Thanks in advance for your comments. If there are no deal-breaking issues, I'll prepare a pull request.
I've added some functions that allow ENIGMA to draw complex (self-intersecting) polygons. For example:

Since this is my first contributed feature --and it's really important to me not to step on the other developers' toes-- I decided to post here for feedback before I make a pull request. The code is available here:
https://github.com/sorlok/enigma-dev/tree/draw_polygon
Discussion is welcome, but please specify if any issues you have are deal-breaking issues. Everyone has different best practices, and I will try to accommodate your suggestions, but I have other features I'd like to work on too if there are no critical mistakes.
In particular, here are some potential issues, none of which I consider deal-breaking. Please let me know what you think:
- Currently only works for the GL1 backend. Rationale: I provide a fallback for other platforms that renders convex polygons. I can add GL3 support easily, too.
- Uses a custom class (PolyVertex) in a list to buffer calls to polygon_vertex(). Rationale: Drawing all at once minimizes GL errors (not ending the polygon) and memory leaks (not freeing temp. vertices for tessellation).
- Uses software tessellation (GLU). Rationale: If we move to hardware tessellation, we can still use this code as a fallback for GL1 and possibly GL ES (with some hacking).
- draw_polygon*() functions are in Graphics_Systems, not a plugin. Rationale: Drawing complex polygons is needed for GM5, and is (I feel) substantially different from primitives (such as triangle fans) to warrant inclusion as a main feature.
- (If I made a mistake in the GLU tessellation code, please let me know. That would certainly qualify as deal-breaking.)
Thanks in advance for your comments. If there are no deal-breaking issues, I'll prepare a pull request.

