• Advertisement

Archived

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

Speed up OnTimer?

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

This is a newbie question I have got a simple physics model going, just some ball trajectories and speeds done in OpenGL graphics. I am using a MSVC6 SDI application with OpenGL support. My problem is that i have a timer that increases the Time_Elapsed variable at OnTimer. However the graphics get jerky, even when the timer is set to 1 millisecond. I''m not sure if its taking time to draw th graphics, or if 1 millisecond isn''t working or what. I just need smoother graphics to make it look real. Anything to get the graphics to execute more times per second would be greatly appreciated. RELIGION IS THE ROOT OF ALL EVIL

Share this post


Link to post
Share on other sites
Advertisement
Don''t rely on WM_TIMER messages -- use QueryPerformanceCounter and QueryPerformanceFrequency to calculate the elapsed time instead -- its much more accurate.

Share this post


Link to post
Share on other sites

  • Advertisement