   INTERVAL_ONE
  When using that flag, does the program stall while waiting for the monitor to be ready to refresh?  Or does it simply not refresh until the monitor is ready?[edited by - PlayGGY on February 2, 2004 12:34:18 AM]
  It stalls the GPU.  The CPU can continue to add more stuff to be rendered.  If there are already 3 frames queued up for render the CPU will stall too.  The CPU unstalls when something like half the buffer is empty.  This can cause problems where you render a few frames quickly, wait, render a few frames quickly, wait, etc... Your animation is based on processing time, not the time things are displayed and you get jerky looking animation, even though you have good framerate.A trick often used is to lock the back buffer, causing a stall until both GPU and CPU are in sync again.  You should delay this as much as possible...ie:ProcessAIProcessSoundProcessInputsUpdateObjectsFrustum/Occlusion cull (if software occ. cull like Zhang HOM)SortLock backbufferUnlock backbufferClearBeginSceneRenderPresentEndSceneBy delaying the lock until just before we render we gain GPU parallelism while doing AI,Sound,Input,and render preparation.  This means our game must now run slightly better than 60Hz to acheive 60Hz, but it''s better than the jerky animation alternative.;  Another (less expensive) way in Direct Draw to resync the devices is to use GetBlitStatus (or GetFlipStatus... I think both will work).  Just loop in a while until these return true, the body being "Sleep(1)".  The advantage of this is that it will cause your program not to take 100% CPU anymore as well 