im trying to rotate a simple cube round on origin to get a bit of experience in animation with openGL, but it aint working ???
it seems ti still rotate around hte point 0,0
heeres my code
glPushMatrix();
glTranslatef(-px,-py,0);
glRotatef(angle,0.0,0.0,1.0);
glTranslatef(px,py,0);
glBegin(GL_QUADS);
glVertex2f(px,py);
glVertex2f(px+50,py);
glVertex2f(px+50,py+50);
glVertex2f(px,py+50);
glEnd();
angle+=1;
glPopMatrix();
thanks for any help in advance, P.S im actually using C++ on this but i believe the openGl is just the same as in Java