Jump to content
  • Advertisement

Archived

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

Morgan

Counters

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

What is the best method for doing counters/timers? I personally do mine by dividing a counter (how much something is done each second) by my fps, but even on my crappy RagePro I can often pull over 100fps which can cause my GLfloats to get too small and no longer work at all. I don''t really want to waste memory using GLdoubles. I was thinking of using a timer which is just called when the specific amount of time has passed, but this won''t work for my physics routines. suggestions? Morgan

Share this post


Link to post
Share on other sites
Advertisement
If you work with win32, make a multimedia timer with timeSetEvent(delay_in_milliseconds,precision_in_milliseconds,pointer_to_callback_function,argument_passed_to_callback_function,TIME_PERIODIC/TIME_CALLBACK_FUNCTION);

Visit our homepage: www.rarebyte.de.st

GA

Share this post


Link to post
Share on other sites
Yeah, That works for some stuff. But, when I''m doing all my physics crap I need it to calculate for each frame rendered, so I guess my real question is: How do I keep my GLfloats from dropping out on me when they get too small? Why don''t they ever default to zero?

Morgan

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!