Slower

posted in WISP
Published May 08, 2007
Advertisement
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.
Previous Entry Successful Execution
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement