I noticed something strange when timing different portions of my code

Started by
1 comment, last by JohnBolton 18 years, 9 months ago
I timed how long it takes to draw the screen with the querry performance counter and my results were odd. Every other cycle it took about .012 seconds to run the rendering and blitting commands. the other times were e^-6. That is a huge difference. Here is what I think is happening and perhaps someone can refute or confirm my hypothosis. I beleive that dx is trying to keep the screen at 60 Hz and there for if i call the rendering command before the timer runs out it will just skip through the procedure and that is why it only takes microseconds instead of 12 miliseconds. is that right? What i have done since then is use my own timer to lock the screen at 60Hz and it actually runs alot smoother.
These tears..leave scars...as they run down my face.
Advertisement
nobody has any comments about this?
These tears..leave scars...as they run down my face.
I don't think your hypothesis is correct but I think you are on the right track. What exactly are you timing? Make sure you are using D3DPRESENT_INTERVAL_IMMEDIATE so that your timing doesn't include waiting for sync.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement