In the following codes, how come if we comment out
glRotatef( 70, 0.0, 1.0, 0.0 ), the Quad draws on right side ( positive x axis), but if that Rotate() is enabled, it draws somewhere in left ( negative x axis), also it is affectiving first Quad drawing somehow, affects even when calling glPushMatrix() and glPopMatrix(). Help me understand. Thanks.
setColor( 1.0, 0.0, 0.0);
glRotatef( 40, 0.0, 1.0, 0.0 );
glBegin( GL_QUADS );
glVertex3f(-1.0f, 1.0f, 0.0f);// Top Left
glVertex3f( 1.0f, 1.0f, 0.0f);// Top Right
glVertex3f( 1.0f,-1.0f, 0.0f);// Bottom Right
glVertex3f(-1.0f,-1.0f, 0.0f);// Bottom Left
glEnd();
setColor( 1.0, 1.0, 0.0 );
glRotatef( 70, 0.0, 1.0, 0.0 );
glTranslatef( 20.0,0.0,0.0 );
glBegin( GL_QUADS );
glVertex3f(-1.0f, 1.0f, 0.0f);// Top Left
glVertex3f( 1.0f, 1.0f, 0.0f);// Top Right
glVertex3f( 1.0f,-1.0f, 0.0f);// Bottom Right
glVertex3f(-1.0f,-1.0f, 0.0f);// Bottom Left
glEnd();