• Advertisement
Sign in to follow this  

How to create an Animation in OpenGL ?

This topic is 3669 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I make an Object that I render in OpenGL move along a given line? And I want to have Play key and Pause key like Music Player ? What do I have to do? please, help me

Share this post


Link to post
Share on other sites
Advertisement
Create a timer that tracks elapsed time. At regular intervals, update your elapsed time and then update the position of your object so that it traverses the line. If you define your line as a parametric equation:
p = p0 + t·u
p will be the position of the object at elapsed time t.
To play and pause, have a flag that you set on a key press. If the flag is true, update the elapsed time, otherwise, don't update elapsed time (t will not change, so p will not change, and so the object will not move).

Share this post


Link to post
Share on other sites
If you are looking for a GUI library to use within an OpenGL application, I recommend CEGUI. (Crazy Eddies GUI). Google for it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement