vertices = [{x:2, y:0}, {x:4, y:2}, {x:2, y:4}, {x:0, y:2}]rotX = 0, rotY = 0, angle = 0, x = 0, y = 0=======R . 0 . .. . . . . 3 . . . 1 . . . . .. . 2 . .rotX = 2, rotY = 2, angle = Math.PI, x = 0, y = 0=======. . 2 . .. . . . . 0 . R . 3 . . . . .. . 1 . .rotX = 2, rotY = 2, angle = Math.PI, x = 2, y = 2=======. . . . . . .. . . . . . .. . . . 2 . .. . . . . . . . . 0 . R . 3 . . . . . . .. . . . 1 . .
glTranslatef(group->x, group->y);glRotatef(group->angle, group->x + group->rotX, group->y + group->rotX, -1.0f);
See, because now that I think about it, the X, Y and angle properties actually seem kind of old-fashioned in this sense.