Jump to content
  • Advertisement
Sign in to follow this  
wozio

methods of vsync to avoid tearing?

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

Hi, I'm trying to avoid tearing in my application and I want to ask about methods doing this. My app is using VMR custom allocator to display video content so this is very important. Also CPU usage should be as low as possible. 1. using D3DPRESENT_INTERVAL_DEFAULT or D3DPRESENT_INTERVAL_ONE but with this it is unable to use waiting time which leads to higher cpu usage than normal sleep with lower frame rates (is Present performs some empty loop while waiting for retrace?). 2. something like that: // rendering here D3DRASTER_STATUS rs; do { // sc is known m_pD3DDev->GetRasterStatus(sc, &rs); if (rs.InVBlank == FALSE) { // waiting here but how long??? } else break; } while (true); // present here BIG QUESTION: how long should I wait (sleep) for blank period to not miss, how to calculate this time? 3. double buffering??? I don't know nothing about that yet ;-) [EDIT] I see that I'm using double buffering, Present just filps back buffer with front buffer, right? Anyway, I have to wait for blank period with Present... Regards Piotr [Edited by - wozio on August 17, 2005 4:29:01 AM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!