Jump to content
  • Advertisement

Archived

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

Sean_Berry

Constant motion

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

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
Advertisement
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
I tried #include <time.h>, but I still get that bugger of an error.....

[Linker error] undefined reference to ''timeGetTime@0''


Rock and Roll,
Sean Berry

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
Make sure you included the lib with an
-lwmm
or
-lwmm32

You should also have at least one space between your included libs. It should look like this, then:
-lopengl32
-lglu32
-lwmm

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!