Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: How to animate premetives individually.

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    18

    How to animate premetives individually.

    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

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,575

    Re: How to animate premetives individually.

    add glPushMatrix() before rotation and drawing of the triangle, then glPopMatrix() to go back to normal.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    18

    Re: How to animate premetives individually.

    Oh Thanks saar. I tried it worked for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •