refactoring GLrenderer to allow drawing of arbitrary polygons