Jump to content
  • Advertisement
Sign in to follow this  
Gilgamesj

OpenGL Changing the refresh rate during fullscreen OpenGL

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

Somehow my OpenGL window always seems to set the refresh rate of my monitor back to 60Hz, while it's perfectly capable of doing 85 Hz on the resolution I use. I checked my driver settings for some kind of manual override but to no avail. Searched on google and on the forums here how to do it in OpenGL, nothing. So anyone know how to do this? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Does your application use ChangeDisplaySettingsEx to change the screen parameters? If so, ensure that the dmFields does not include the flag DM_DISPLAYFREQUENCY. Otherwise it will use the dmDisplayFrequency of the DEVMODE struct you're passing, and if that's set to 0, it will use the 'default refresh' which usually means 60Hz.

Share this post


Link to post
Share on other sites
Ah, I'll try that, but the minute I posted this a friend came with a solution, he had been looking to find something for it too.

He found this tool which makes your windows only see the max refresh rate per reso your monitor can handle:
http://www.pagehosting.co.uk/rf/

It'll auto-detect all the resolutions your monitor is capable of displaying with the according maximum refresh rate. So if anyone is having the same problem, you can check this out. Advantage: It'll work for games you play too, since most games are always on 60 Hz >.>

Share this post


Link to post
Share on other sites
It will probably be 60Hz anyway, even if you don't add the flag DM_DISPLAYFREQUENCY, that's just how many drivers make sure it doesn't go out of range.

You can set it yourself by setting the dmDisplayFrequency variable in the DEVMODE structure to the refresh rate you want, and of course add the DM_DISPLAYFREQUENCY flag to dmFields.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tree Penguin
It will probably be 60Hz anyway, even if you don't add the flag DM_DISPLAYFREQUENCY, that's just how many drivers make sure it doesn't go out of range.


I had assumed that if one did not specify the DM_DISPLAYFREQUENCY that it would at least attempt to use the current refresh rate, and only fall back to safety (60Hz) if one is attempting 1600x1200@120Hz for example (which I'm sure few monitors can do). Assumptions are bad, I know :(

Quote:
Original post by Tree Penguin
You can set it yourself by setting the dmDisplayFrequency variable in the DEVMODE structure to the refresh rate you want, and of course add the DM_DISPLAYFREQUENCY flag to dmFields.

I would highly recommend this course of action also. Any and all games should give one the option to choose the refresh rate, just like one can choose the resolution.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ro_Akira
I would highly recommend this course of action also. Any and all games should give one the option to choose the refresh rate, just like one can choose the resolution.


Yeah, HL2 for instance, you can see the screen flickering at bright environments because of the 60Hz refreshrate, that just sucks :).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!