All week I’ve been banging my head on the wall on trying to get two objects to rotate independently. I’ve searched this site and many others but I can’t find any help on this matter.
In my display function, based on what I have seen…my logic is this…
glPushMatrix();
glRotate(axis1…);
…Draw object…
glPopMatrix();
glPushMatrix();
glRotate(axis2…);
…Draw second object
glPopMatrix(…);
But this doesn’t seem to work. The first object STILL rotates with the second. Why is this? I thought the Push makes the new matrix active? Even if I take out the Rotate func for the first object, it still rotates with the second on axis #2.
Is there something I’m not doing? I’ve seen no examples that accomplish this task. It must be simple…I just can’t see it.
If anyone could help me with this, I’d really appreciate it.