PDA

View Full Version : How to animate premetives individually.



SANTOS_GL
03-26-2009, 07:29 AM
Hi all,

I have displayed cube, and a triangle. Now i want to keep cube constant and want to rotate, triangle on the X/Y/Z axis.

when i do the rotation on the either axis, it is rotating along with cube. How can i animate one object at a time.

THanks

ZbuffeR
03-26-2009, 08:02 AM
add glPushMatrix() before rotation and drawing of the triangle, then glPopMatrix() to go back to normal.

SANTOS_GL
03-26-2009, 11:44 PM
Oh Thanks saar. I tried it worked for me.