Setting the Refresh Rate in OpenGL ?

Started by
3 comments, last by SGreth 22 years, 10 months ago
Just wondering what any of you out there who are releasing games/demos do to detect/set the current refresh rate. My current fps is maxed out at 60 (due to a lame default choice by ChangeDisplaySettings which I''ll fix later). I know how to use EnumDisplaySettings() to list all of the display modes, but that''s just what the *video card* supports. How much would that suck if I set the refresh rate to 120 on a monitor that can only do 60 Is there a way to enuerate a monitor''s refresh rate or am I stuck with defaulting to 60 for everybody despite the fact that there are so few 60Hz motitors out there (granted, I have one that''s still kick''n). Thanks, ~S''Greth
"The difference between insanity and genius is measured only by success."~Bruce Feirstein
Advertisement
I am running linux at the moment so I can not check this but does not EnumDisplaySettings give the available frequncies you can use with the current monitor?
Remember that EnumDisplaySettings is limited for some win9X system.

I do not think that anyone more experienced programmer would even think of locking it above 60 fps.
Are you sure it is just what the card supports?

In my engine it returns what the card + monitor can handle (my Geforce 2 MX could easily kill my monitor).

Coder10000
EnumDisplaySettings() won''t only give you what the card supports, but what the monitor supports.

Just iterate through all of them, and keep the ones with the fitting resolution, then select the one with the highest refresh rate. Has always worked for me.

Ciao, ¡muh!
They're watching us...
If you call ChangeDisplaySettings with a refresh rate of 0, the best videomode is used (at least it works for me :-))

Darkening

This topic is closed to new replies.

Advertisement