Jump to content
  • Advertisement
Sign in to follow this  
Balk

Vsync window mode questions

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

I have an application that needs to run on a duel monitor chassis, and have created two windows with two swap chains, positioned and sized to simulate full screen. My device is set to windowed mode.

The way I'm currently handling screen tearing is by setting PresentParams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE, and manually checking for vertical blank using SwapChain::GetRasterStatus() before rendering, otherwise skipping it until next update loop.

My issue is that I still get tearing, but near the top of the screen. Is this because my rendering is taking a little too long, and we leave vBlank before I present?

Also, in my case where I have two monitors and I'm rendering in Windowed mode, how does GetRasterStatus() know which monitor to query? What's stopping me from placing the window between the extended desktop?

When I set PresetnParams.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT without manually checking for vertical blank, my updates and rendering are throttled to 60FPS (obviously) and gets rid of tearing, but it produces inconsistent framerates which aren't acceptable.

When I set PresetnParams.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT and also manually check for vertical blank my rendering drops from 60FPS -> 30FPS... so it seems to be missing every other vBlank.

Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
I don't think it is possible to manually control VSYNC like that on Windows. There's a lot of driver stuff going on so it's hard to know for sure, but I do know that on consoles handling VSYNC is a very very low-level thing that requires hardware interrupts and very precise timing. So I don't think you will have much success by having a user-mode program wait for the VBLANK, and then try to get the driver to flip (since the flip needs to happen immediately after the VBLANK in order to avoid tearing).

Share this post


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

  • 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!