Archived

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

DanG

Speed up OnTimer?

Recommended Posts

DanG    122
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
invective    118
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