PDA

View Full Version : refresh rate



mohamed adel
01-21-2003, 01:48 PM
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.

mikael_aronsson
01-21-2003, 10:56 PM
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

Structural
01-21-2003, 11:39 PM
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: http://www.gamedev.net/community/forums/topic.asp?topic_id=134516

mohamed adel
01-24-2003, 01:18 AM
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

Mazy
01-24-2003, 01:24 AM
EXT_swap_control
look for it in the extension registry

marcus256
01-24-2003, 09:55 AM
Originally posted by Mazy:
EXT_swap_control
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 (http://hem.passagen.se/opengl/glfw/) , which has a portable (and easy to use) version: glfwSwapInterval() http://www.opengl.org/discussion_boards/ubb/smile.gif