This is the routine I use for rendering the tiles
private static void renderTile(int x1, int y1, int size) {
glBegin(GL_TRIANGLES);
double halfSize = size/2;
glVertex2d(x1 + halfSize, y1 + halfSize);
glVertex2d(x1 + halfSize, y1 - halfSize);
glVertex2d(x1 - halfSize, y1 - halfSize);
glVertex2d(x1 - halfSize, y1 - halfSize);
glVertex2d(x1 - halfSize, y1 + halfSize);
glVertex2d(x1 + halfSize, y1 + halfSize);
glEnd();
}
Now, the routine works, but, it looks a bit messy. Is there a better way to do this with Java OpenGL + LWJGL?