Archived

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

Sean_Berry

Constant motion

Recommended Posts

Hi all, How would I keep the rotation of my objects consistent regardless of the machine? Even on one machine, my triangles move faster in full screen mode than in windowed. How do I fix this? A time function? Thanks, Sean Berry

Share this post


Link to post
Share on other sites
Well, a simple way of doing it is the following:
glRotatef(timeGetTime()/100.0f,0,1,0);
What this does is make it so that the triangles movement depends on the time elapsed, rather than the value of a variable. The function timGetTime returns the time ellapsed in milliseconds. I divided it by 100 so it wouldn't go too fast.

[edited by - tHiSiSbOb on October 24, 2003 5:30:15 PM]

Share this post


Link to post
Share on other sites
Awesome, that worked for the compilation.

But this sailor isn''t out of the storm.

When I run the .exe, I get this familiar error.

The procedure entry point SetPixelFormat could not be located in the dynamic link library winmm.dll


Any ideas?

Thanks forum viewers,
Sean Berry

Share this post


Link to post
Share on other sites