Java Examples for org.lwjgl.opengl.GL11.GL_POLYGON
The following java examples will help you to understand the usage of org.lwjgl.opengl.GL11.GL_POLYGON. These source code samples are taken from different open source projects.
Example 1
| Project: Dwarf2D-master File: draw.java View source code |
public static void fillPolygon(Point2D[] points, Point2D translation, double rotation, Colour colour) {
glPushMatrix();
{
glTranslated(translation.getX(), translation.getY(), 0);
glRotated(rotation, 0, 0, 1);
colour.bind();
glBegin(GL_POLYGON);
{
for (Point2D point : points) {
glVertex2d(point.getX(), point.getY());
}
}
glEnd();
glFlush();
colour.realse();
}
glPopMatrix();
}