rotation question

How do I rotate about an object while keeping it in view? That is, rotating around an object while still keeping the object in sight and still having the same distance.

A “look-at” function is what you’re looking for. gluLookAt() is a start. However there are more robust functions that’ll let you actually orbit object A around object B while keeping object A facing object B. Check Google for this.

Rotate the object in object space, ie. first do the rotation around it’s center (usually that’s the origin of objects, if not you need to move it there, rotate and move it back) and only after that move it to it’s world position.