Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dalaptop

Rotation only works when mouse moves

This topic is 5243 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 using C++ and DirectX to render a 3d pyramid. I''m using a rotation matrix to spin it on its y axis. The funny thing is it works for about the first second and then it stops, but it will keep spinning if I start to move the mouse. Maybe my rendering loop is conflicting with the message pump some how. Has anyone ever seen this before? Any help would be much appreciated. Thanks. Andrew Clark

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Post your message pump code.

Share this post


Link to post
Share on other sites
i had this prob when using direct3d with mfc, i put the render code in the OnPaint function, so the window only repaints when you move your mouse, now if your using the winapi you should put the render code in with the message pump so the render code gets called with every pass or set it up to be called with every pass in the loop when there is no message to be processed, no if your using mfc what i did was to create a timer and have your render code in the OnTimer function i wouldn''t the timer time too low or it will hold up you whole app i had mine set to be called every 80 milliseconds and it worked just fine.

i hope this helps

Share this post


Link to post
Share on other sites

  • 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!