Jump to content
  • Advertisement
Sign in to follow this  
mike74

vertical retrace

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

Is there any way to check for the vertical retrace on Windows? I have a fullscreen game pulling about 150 fps and sometimes it flickers. I'd like to eliminate the flicker and bring the frame rate in sync with the monitor's refresh rate. Thanks. mike http://www.coolgroups.com/

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by mike74
Is there any way to check for the vertical retrace on Windows? I have a fullscreen game pulling about 150 fps and sometimes it flickers. I'd like to eliminate the flicker and bring the frame rate in sync with the monitor's refresh rate.
Look into VSync. You can force it on or off from your graphics card's driver settings. If you are using OpenGL you can use the WGL_EXT_swap_control extension to control it. I don't know off the top of my head how you control it through Direct3D, but you can look it up if you need to.

Share this post


Link to post
Share on other sites
In Direct3D I believe you set PresentationInterval to D3DPRESENT_INTERVAL_ONE in D3DPRESENT_PARAMETERS *pPresentationParameters argument of CreateDevice

Share this post


Link to post
Share on other sites
back in my direct draw days I used to use the WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL); function, this is a member of the LPDIRECTDRAW4 object I know it's all 2d stuff, but I'm sure that direct3d objects have a similar method, if not you could queary a directdraw interface for this purpose, not sure if they would play nicely together tho.

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!