Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

John Jacobson

Synchronizing display to monitor refresh

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

Question: In OpenGL on a Windows XP machine I''d like to synchronize the display of a image with the monitor''s refresh rate to present stimuli for psychophysics. Does anyone know how to do this? Details: I have found that the SwapBuffers command does not wait for vertical retrace before displaying images. I downloaded and compiled the Lesson 4 code and found (1) that if the rotation of the triangle increment is set to 1 degree and the monitor refresh-rate to 60 hz, the triangle rotates in 4.9 seconds rather than the expected 6 seconds (6=360/60); (2) that changing the monitor refresh rate to 85 hz does not change the rotation time of the triangle, as would be expected if SwapBuffers waited; And (3) if the rotation increment is set to 180 degrees, the image tears like mad, indicating asynchrony. Kudos: Excellent site. Thanks, Kudos:

Share this post

Link to post
Share on other sites
check your advanced video properties for your video card. you may have forced vsync off, thus the only way to get vsync on is to change the value back to "on by default". i know nvidia cards have this in their video properties. for other cards you
may need to download some tweak app.

you can try timing things to stop on retrace by using directdraws waitfor retrace before calling swapbuffers.

if that dont work out, and you cant get gl to wait on vsync. then try sdls opengl wrapper. if that fails, try d3d.

though i think its merely you need to change the video card settings.

Share this post

Link to post
Share on other sites

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