z0w0 / helm

A functionally reactive game engine, with headgear to protect you from the headache of game development provided.
http://helm-engine.org/
MIT License
598 stars 69 forks source link

Fixed the last line of Polygons not being drawn #109

Closed Purrlite closed 7 years ago

Purrlite commented 7 years ago

I noticed that polygon and also ngon didn't actually draw the last line (the one from the last point to the first point - so it drew things like this) without duplicating the first point of the polygon. The documentation of polygon states, that shouldn't be necessary though.

So I went into the code and changed the rendering of Polygons to duplicate the first point before rendering, which it didn't seem to be doing, thus causing this bug.

Afterwards I tested the same shapes and it drew them correctly again.

z0w0 commented 7 years ago

Cheers. Will take a look later today.

z0w0 commented 7 years ago

Cheers!