Rotating a third person camera

I am making a third-person shooting game, and basically i want the camera to rotate around an object (sorta like they way a planet revolves around the sun). How would i be able to accomplish this?

AUGH why cant opengl make it as easy as drawing a sphere rotating around another sphere.

Thanks alot guys,
Psiborg

It’s not up to OpenGL to provide such functionality. OpenGL’s main purpose is to let you use your GPU.

Basically you need to compute camera position, and then look at player from that position (gluLookAt does the second part).
Or you could just do something like this:

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(....);
glTranslatef(0.0f, 0.0f, -distance);
glRotatef(cameraAngleX, 1, 0, 0);
glRotatef(cameraAngleY, 0, 1, 0);