Movable and Immovable objects problem !

Hi people

I want to design two objects on the screen, one of them is fixed and the other one is moving using for example with glRotate and all of them are in a single function.
How can I do it?
just need the logic( Algorithm ) behind it, I think I can do the codeing. Maybe I have to use glPush/PopMatrix(). But how?

Any clues would be appreciated.

P.S: I use visual c++ (Console Environment)

try something like this:

  • draw static geometry
  • push matrix
  • set transformation for moving object
  • draw moving geometry
  • pop matrix

i assume that you set initial modelview and projection matrices in some init function

thanx mate
It helped