Jump to content
  • Advertisement


Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


Not so much progress today as I desired. Poo.

I made a modification to my timer component, and added a refinement timer component to replace the functionality. Previously, I had a timer that was based off of the performance counter in Windows, and would only update its time at the beginning of the frame (in its Process() function). This way, every component could read the exact same time for the entire duration of the frame.

What I decided to do instead is make the performance timer component an instantaneous timer, so that calls to get the time would immediately query the performance timer and return the result. I then made a discrete timer component that, as part of its constructor, took a shared_ptr to any other timer, and would only query that timer's time during the Process() function, providing the functionality that my single timer component provided previously. This way, I now have access to instantaneous time or discrete time, and I think the code allows the two functionalities to be separated in an appropriate manner. I can now easily use other timers (based on different system/library calls, or combinations of those calls to smooth out discontinuities), and still get discrete timing without having to rewrite it for every different timing method.

My progress with CEGUI so far has been trivial, so I'll just wait until after I get it working (which may be tonight, but most likely tomorrow) to comment on it.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!