Advertisement

Sleeping

Started by January 03, 2001 03:49 AM
0 comments, last by Tony798 23 years, 10 months ago
Hi, Does anyone know of a cross-platform sleep function ? I''m doing some basic animation and at the moment it goes do fast that all the intermediate steps aren''t visible. I''m using ANSI C so anything along those lines (works in linux and windows) would be great. Cheers
you should set up a timer and synchronize your animation using it. NeHe''s game tutorial does this. My library (link in the signature) has a timer class that is available in both linux and windows, but the linux one uses clock() and the windows one uses timeGetTime() - but through the same interface using virtual functions. (Source code is available if you download the lib.)

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!

This topic is closed to new replies.

Advertisement