refresh rate

The no of fps is restricted to the refresh reat.I know how to change it in direct 3d to change it but i don’t know how to change that in openGL. can any one help me? thanks in advance.

Hi !

You don’t, you set this in the control panel, click on “display” and then go to the “settings” tab, if you can change it you do this in the video driver settings.

By the way, turning of the vsync is pretty useless, why would any one want 600 FPS ?, 60-75 should be just fine, I cannot think of a reason to use more, it’s just a wast of CPU time.


Mikael, I have found it quite handy to turn off vsync when making my project. I could exactly see what the effects were on framerate. I saw one time that by some implementation my framerate dropped from 250 to 100. With vsync on I hadn’t noticed this, and I’d have gone further without bothering.

Mohamed, Mikael is right on how to turn vsync off. It might be in your videodriver settings. There is also a way of turning this off in-code, but I have no idea how. There was a thread about this on gamedev recently, perhaps you can use it:

Thanhs a lot for your help.this method worked but there’s a way in the code of the program itself to restrict the frame rate to the refresh refresh rate or not in direct x so i was asking if it is possible to do it in openGL

look for it in the extension registry

Originally posted by Mazy:
look for it in the extension registry

Specifically, WGL_EXT_swap_control for Windows, or GLX_SGI_swap_control for X11 (only a few X implementations support this, I think - NOT nVidia/Linux).

Or, use GLFW , which has a portable (and easy to use) version: glfwSwapInterval()