Jump to content
  • Advertisement
Sign in to follow this  
Alundra

[D3D11] VSync needs recreate swap chain ?

This topic is 1815 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 all,

here the doc of Present :

Presents a rendered image to the user.

HRESULT Present([in]  UINT SyncInterval,[in]  UINT Flags);

SyncInterval [in] : 

  • 0 - The presentation occurs immediately, there is no synchronization.
  • 1,2,3,4 - Synchronize presentation after the nth vertical blank.

 

using : 
sd.BufferDesc.RefreshRate.Numerator = 60;
sd.BufferDesc.RefreshRate.Denominator = 1;
and just switch on the present function from 0 to 1 without recreate the swap chain looks good when I show FPS using fraps.
Now the question is : "Is it bad to do the vsync feature like that ?".
Thanks

 

Share this post


Link to post
Share on other sites
Advertisement

That's exactly how you're supposed to do it. You don't need to re-create the swap chain just to enable or disable VSYNC.

Share this post


Link to post
Share on other sites

Thanks for the answer.

On the same topic of swap chain, what's about switch windowed to fullsreen ?

Does it need to recreate the window with swap chain ?

Share this post


Link to post
Share on other sites

The easiest way to do it is to call SetFullScreenState on the swap chain. You can use ResizeBuffers if you need to change the size of the back buffer when switching to full screen.

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!