Jump to content
  • Advertisement
Sign in to follow this  
Malder1

How to add vertical synchronization to windowed D3D application?

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

Please advice me how to write maximally fast realization of vertical synchronization in windowed Direct3D application? I found two variants: 1) D3DSWAPEFFECT_COPY_VSYNC flag 2) Or read GetRasterInfo and wait when current scanline will be at 0 position. In both cases we lost time, because we need to wait, unlike fullscreen mode where we can use triple buffering.

Share this post


Link to post
Share on other sites
Advertisement
You could use IDirect3DDevice9::GetSwapChain to get the swap chain for your windowed device, then use the extra D3DPRESENT_DONOTWAIT flag with the IDirect3DSwapChain9::Present method.

The Present call will then return D3DERR_WASSTILLDRAWING until the presentation has been synchronised with the VSYNC; when your application recieves D3DERR_WASSTILLDRAWING, it can perform other (non-D3D) processing with the CPU.

Share this post


Link to post
Share on other sites
Thank you for your quick response!

Unfortunately I still use Direct3D 8.0, because we're creating multimedia application and need more wide compatibility.

I could use fullscreen mode, but screen may blinks on some systems and ATI has doubt option which allows to change color settings specially in fullscreen games. So our multimedia application also will have damaged colors. As you know all games made in dark colors, and users often change color settings for games, but usual application and photos has usual optimal brightness.


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.

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!