-
glRotate
hi,
what i have is a quad that looks like an arrow:
Code:
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glTexCoord2f(1.0f, 0.0f);
glVertex3f(-0.5f, 0.5f, 0.0f);
glTexCoord2f(1.0f, 1.0f);
glVertex3f(-1.0f, 0.0f, 0.0f);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(1.0f, 0.5f, 0.0f);
glEnd();
if i do glRotatef(a, 1.0f, 0.0f, 0.0f); it rotates around the lower left vertex, that is the lower left never moves. how do i make it rotate around the center?
-
Translate the cube to the centre of the screen before calling glRotatef
-