If you want to rotate around x=5
you should do a glTranslate
to x=5
and whatever your y coordinate is and then do glRotate
then glTranslate
back to the origin.
So something like
glTranslate(5, 0, 0);
glRotatef(...);
glTranslate(-5, 0, 0);
For the first question I'm including @genpfault's answer for completeness. It is due to vector normalization done by glRotatef()
on the vector you pass in.