Visual Stimuli In Opengl

I have been recently attempting an experiment in many different laguages that requires two different pictures (visual stimuli) to swap every refresh rate. This means that I will have to find out how to control how images/ buffers swap according to a specification of the refresh rate or something of the sort. If you have any ideas or suggestions, they would be greatly apprectiated. Thanks!

Use the Sync, Luke

Draw one of the pictures into the back buffer, VSync, swap buffers.

VSync always waits until the cathod ray of the monitor is “running back” from the bottom of the screen to the top in order to generate the next image (vertical blank). Everything you do during this time (e.g. swapping buffers) can’t be seen cause the ray is turned off and no picture is generated.

Thanks for the tip Dodger! I will try this method as soon as possible however, I cannot seem to find any site (including the blue and red book online references) that have the parameters for this command. If you know where I could find this, please tell me -

-nate