LIBGDX: How do I draw a filled polygon with the shaperenderer?
I have defined a shape using an array of vertices: float[] points = new float[]{50,60,50,70,60,70, 60,60,50,60}; And I am drawing this here: shapeRenderer.polygon(floatNew); This just gives an outline of the shape. How do I fill it with colour? Thanks Currently, ShapeRenderer supports polygon drawing (by line) but not filling. This code is clipping the polygon on triangles, and then drawing each triangle separately. Edit ShapeRenderer.java like this: EarClippingTriangulator ear = new EarClippingTriangulator(); public void polygon(float[] vertices, int offset, int count) { if (shapeType !=