I'm trying to draw an image as a polygon in Swing but I don't know how. Now I only have code to draw filled polygon. This is not a cropped image, it is distorted.
What I need (Polygon with texture):
What I have - Filled polygon
gr.fillPolygon(x_points, y_points, points.length);
The easiest way to render 3D is using JOGL library which uses OpenGL to render in JPanel.