Added polygonmode toggle.