Win32, opengl, display frequency

Hi! How do you change display frequency in fullscreen opengl mode?
60hz is not too good.

Best regards,
Gene mailto:@Gene_Krokodil

Hi! How do you change display frequency in fullscreen opengl mode?
60hz is not too good.

I don’t think this is something you can change with SDL. I COULD BE
WRONG.

Under windows (which I no longer use very often,) what I would
recommend doing is going into your display control panel, loading up
the resolution your game will be playing under, then set the refresh
rate appropriately, apply, then go back to your original resolution.
Windows associates a refresh rate for each supported resolution for
each monitor you ever plug in, and when you load up your game, it
should remember the refresh rate.

That’s the best advice I can give you, I hope it helps.On Jul 16, 2004, at 6:21 AM, Gene Krokodil wrote:

Best regards,
Gene mailto:springster at tut.by


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Gene Krokodil wrote:

Hi! How do you change display frequency in fullscreen opengl mode?
60hz is not too good.

Windows XP uses 60Hz as a default OpenGL refresh rate. Setting it to
another value is video driver-dependent.

Stephane

If you mean setting up an OpenGL window with a better refresh rate, it’s
not driver-dependent at all; it’s merely a parameter to ChangeDisplaySettings.On Sat, Jul 17, 2004 at 09:45:20AM +0200, Stephane Marchesin wrote:

Hi! How do you change display frequency in fullscreen opengl mode?
60hz is not too good.

Windows XP uses 60Hz as a default OpenGL refresh rate. Setting it to
another value is video driver-dependent.


Glenn Maynard

Glenn Maynard wrote:>On Sat, Jul 17, 2004 at 09:45:20AM +0200, Stephane Marchesin wrote:

Hi! How do you change display frequency in fullscreen opengl mode?
60hz is not too good.

Windows XP uses 60Hz as a default OpenGL refresh rate. Setting it to
another value is video driver-dependent.

If you mean setting up an OpenGL window with a better refresh rate, it’s
not driver-dependent at all; it’s merely a parameter to ChangeDisplaySettings.

… with no easy way to know whether the screen supports the requested
refresh rate, AFAIR.
Which makes it impossible to put into SDL.

Stephane

The only problem I know of is that some users’ monitors are misconfigured, and
so Windows thinks they support modes which they don’t, so defaulting to
higher refresh rates can cause problems. (I don’t think I’ve ever seen
this happen on a PnP monitor.) This is unrelated to video drivers.

I know that I’ve released game snapshots which defaulted to the maximum
refresh that Windows thought was supported, and received bug reports of
people’s monitors being desynced. I may revisit it at some point, using 70
or 72Hz instead of the maximum.On Sat, Jul 17, 2004 at 10:14:48AM +0200, Stephane Marchesin wrote:

Windows XP uses 60Hz as a default OpenGL refresh rate. Setting it to
another value is video driver-dependent.

If you mean setting up an OpenGL window with a better refresh rate, it’s
not driver-dependent at all; it’s merely a parameter to
ChangeDisplaySettings.

… with no easy way to know whether the screen supports the requested
refresh rate, AFAIR.
Which makes it impossible to put into SDL.


Glenn Maynard

Windows XP uses 60Hz as a default OpenGL refresh rate. Setting it to
another value is video driver-dependent.

If you mean setting up an OpenGL window with a better refresh rate,
it’s
not driver-dependent at all; it’s merely a parameter to
ChangeDisplaySettings.

… with no easy way to know whether the screen supports the requested
refresh rate, AFAIR.
Which makes it impossible to put into SDL.

The only problem I know of is that some users’ monitors are
misconfigured, and
so Windows thinks they support modes which they don’t, so defaulting to
higher refresh rates can cause problems.

Okay, if you KNOW HOW to change the monitor refresh rate, why not tell
this guy? He can easily create a dialog for the user to configure the
refresh rate he wants, if it’s too high, the user will definitely be
able to tell, and hypothetically, perhaps not pressing anything for 6
seconds will cause it to go back to the original refresh rate where he
can try another, or keep the current one. Right?On Jul 17, 2004, at 4:31 AM, Glenn Maynard wrote:

On Sat, Jul 17, 2004 at 10:14:48AM +0200, Stephane Marchesin wrote:

(I don’t think I’ve ever seen
this happen on a PnP monitor.) This is unrelated to video drivers.

I know that I’ve released game snapshots which defaulted to the maximum
refresh that Windows thought was supported, and received bug reports of
people’s monitors being desynced. I may revisit it at some point,
using 70
or 72Hz instead of the maximum.


Glenn Maynard


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I’ve already said what the API call is; you quoted it yourself. Drop the
attitude.On Sat, Jul 17, 2004 at 04:37:56AM -0400, Donny Viszneki wrote:

If you mean setting up an OpenGL window with a better refresh rate,
it’s
not driver-dependent at all; it’s merely a parameter to
ChangeDisplaySettings.

… with no easy way to know whether the screen supports the requested
refresh rate, AFAIR.
Which makes it impossible to put into SDL.

The only problem I know of is that some users’ monitors are
misconfigured, and
so Windows thinks they support modes which they don’t, so defaulting to
higher refresh rates can cause problems.

Okay, if you KNOW HOW to change the monitor refresh rate, why not tell
this guy? He can easily create a dialog for the user to configure the
refresh rate he wants, if it’s too high, the user will definitely be
able to tell, and hypothetically, perhaps not pressing anything for 6
seconds will cause it to go back to the original refresh rate where he
can try another, or keep the current one. Right?


Glenn Maynard

If you mean setting up an OpenGL window with a better refresh rate,
it’s
not driver-dependent at all; it’s merely a parameter to
ChangeDisplaySettings.

… with no easy way to know whether the screen supports the
requested
refresh rate, AFAIR.
Which makes it impossible to put into SDL.

The only problem I know of is that some users’ monitors are
misconfigured, and
so Windows thinks they support modes which they don’t, so defaulting
to
higher refresh rates can cause problems.

Okay, if you KNOW HOW to change the monitor refresh rate, why not tell
this guy? He can easily create a dialog for the user to configure the
refresh rate he wants, if it’s too high, the user will definitely be
able to tell, and hypothetically, perhaps not pressing anything for 6
seconds will cause it to go back to the original refresh rate where he
can try another, or keep the current one. Right?

I’ve already said what the API call is; you quoted it yourself. Drop
the
attitude.

embarassed

Actually after reading what I wrote (or more importantly, how I wrote
it,) I did come off as though I had an attitude. I didn’t actually mean
to sound that way. I was just very distracted, and even as I sent the
email I saw a lot of things about the email that I’d have gone back and
changed if I hadn’t already hit send in my haste.

Yes I saw ChangeDisplaySettings, I just assumed there was more to it
than that (I tried to man ChangeDisplaySettings but no luck :frowning:

Sorry again.On Jul 17, 2004, at 4:43 AM, Glenn Maynard wrote:

On Sat, Jul 17, 2004 at 04:37:56AM -0400, Donny Viszneki wrote:


Glenn Maynard


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Thanks a lot for your help! Since I have to go winapi way I will lose
all the x-platform charm. It’s a pity :(–
Best regards,
Gene mailto:@Gene_Krokodil

Glenn Maynard wrote:

… with no easy way to know whether the screen supports the requested
refresh rate, AFAIR.
Which makes it impossible to put into SDL.

The only problem I know of is that some users’ monitors are misconfigured, and
so Windows thinks they support modes which they don’t, so defaulting to
higher refresh rates can cause problems. (I don’t think I’ve ever seen
this happen on a PnP monitor.) This is unrelated to video drivers.

I was mentioning video drivers, since these sometimes provide a way to
override the refresh rates.
So that can be quick and easy fix for the end user.

Stephane

Thanks a lot for your help! Since I have to go winapi way I will lose
all the x-platform charm. It’s a pity :frowning:

Use #ifdef and conditionally compile that code for windows, other
platforms probably have better choices for refresh rates anyway.

-bob

-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3589 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040717/420ab75e/attachment.binOn Jul 17, 2004, at 8:03 AM, Gene Krokodil wrote:

Gene Krokodil <springster tut.by> writes:

Hi! How do you change display frequency in fullscreen opengl mode?
60hz is not too good.

Best regards,
Gene mailto:springster tut.by

Hi,

I don’t know how is under linux, but you can turn off the vertcial sync on
openGL using:

//declaration
PFNWGLSWAPINTERVALEXTPROC wglSwapInterval = NULL;

// Under InitGL
wglSwapInterval = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress
(“wglSwapIntervalEXT”);
if (wglSwapInterval) {
wglSwapInterval(0);
}