Jump to content
  • Advertisement
Sign in to follow this  
fathom88

Correct Way To Do Animation???

This topic is 4806 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

I'm trying to do animation with the CDC in VC++. Currently, I use a timer and then update my drawing points. Afterward, I update my drawing by calling Invalidate() then UpdateWindow to trigger the OnDraw fuunction which I over-rided to draw my points. It draws moving points fine. Is this the correct way to do animation update? Or should I do something else?

Share this post


Link to post
Share on other sites
Advertisement
From how you describe it that yes this is fairly close to how you want to have drawing work. Most games use something very similar to what your doing so they can limit there fps(frames per second). Now if your doing it the 'best' way I don't know.

Share this post


Link to post
Share on other sites
I heard that windows timers aren't very accurate. Personally I'd create another thread to draw the thing, but it all depends on what kind of application you are creating. If windows timers are working fine then I guess you don't need to worry about it.

Share this post


Link to post
Share on other sites
I think that would work also. And if you were to use a graphics engine like DirectDraw or Direct3D (though you might not have to manually do it D3D), you would probably be seeing stuff about Flipping or Swapping.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!