Refresh rate

How I can choice the refresh rate for a full screen display?

Basically, the right question is:
SDL choices the best refresh rate for its display in full screen windows?

I ask this question again and again, so maybe I become tedious.

What we can do with refresh rate in Windows?

I know, I know, SDL is not responsible for this but only Windows

However…

It is very ungly for our OpenGL programs to run in 60Hz at full screen

thanks

At 11:49 PM 29/09/2003 +0300, you wrote:

I ask this question again and again, so maybe I become tedious.

What we can do with refresh rate in Windows?

I know, I know, SDL is not responsible for this but only Windows

IIRC it is locked in somewhere in the settings for your graphics card, and
surprisingly difficult to stop the frame rate (flip rate) being capped at
60hz regardless of your actual refresh rate. A friend had an app for
removing the cap, Im not sure how you’d do it from within your game
though… sorry

Neil.

Im not much more help, but try asking around or googling for how to disable vsync from within your game.

or…ask around on irc…particularly on undernet in #OpenGL, i heard rumors of a guy who goes by Squall that knows how to do that so other people around there must know as well.----- Original Message -----
From: Neil Brown
To: sdl at libsdl.org
Sent: Monday, September 29, 2003 2:47 PM
Subject: Re: [SDL] refresh rate

At 11:49 PM 29/09/2003 +0300, you wrote:

I ask this question again and again, so maybe I become tedious.
 
What we can do with refresh rate in Windows?
 
I know, I know, SDL is not responsible for this but only Windows

IIRC it is locked in somewhere in the settings for your graphics card, and surprisingly difficult to stop the frame rate (flip rate) being capped at 60hz regardless of your actual refresh rate. A friend had an app for removing the cap, Im not sure how you’d do it from within your game though… sorry

Neil.

A quick google search for -windows opengl refresh rate- showed a long
list of sites where you can go to protest this problem. You are an MS
customer, you have a right to have the product you paid for work
properly. In this case it looks like MS is deliberately taking steps to
make sure that OpenGL programs don’t work as well as DirectX programs.
That kind of behavior is illegal in most countries.

You should:

  1. file a bug report with MS and ask for a patch or your money back
  2. contact the appropriate government agency and file a complaint.

The point is that you should bother the people who can fix the problem,
MS and law enforcement, and stop bothering the rest of us victims.

	Bob Pendleton

P.S.

I apologize to the whole list for replying to an off topic reply.On Mon, 2003-09-29 at 15:49, <- Chameleon -> wrote:

I ask this question again and again, so maybe I become tedious.

What we can do with refresh rate in Windows?

I know, I know, SDL is not responsible for this but only Windows

However…

It is very ungly for our OpenGL programs to run in 60Hz at full screen

thanks


±----------------------------------+

I know, I know, SDL is not responsible for this but only Windows

No, SDL is 90% responsible for this.

(The other 10% is that Windows doesn’t reliably tell you what the
maximum refresh rate is, so you can’t simply tell Windows to use
the maximum available–on some broken systems, that’ll result in
a desynced monitor.)

IIRC it is locked in somewhere in the settings for your graphics card, and
surprisingly difficult to stop the frame rate (flip rate) being capped at
60hz regardless of your actual refresh rate. A friend had an app for
removing the cap, Im not sure how you’d do it from within your game
though… sorry

I don’t know why people seem to believe there’s no way to set the OpenGL
refresh rate from an application in Windows. There is, and it’s not
even obscure; it’s a trivial and documented parameter change to
ChangeDisplaySettings.

I do have a patch for this; I meant to send it several months ago but
I’ve been busy. I’ll try to clean it up and post it soon; I’d love
to get rid of one more of my app-local SDL hacks. (This patch isn’t
ideal, since I havn’t found logic to find sane default refresh rates
over 60hz that won’t break on poorly-configured systems, but it at least
gives applications the option.)On Mon, Sep 29, 2003 at 10:47:07PM +0100, Neil Brown wrote:


Glenn Maynard

IIRC it is locked in somewhere in the settings for your graphics card, and
surprisingly difficult to stop the frame rate (flip rate) being capped at
60hz regardless of your actual refresh rate. A friend had an app for
removing the cap, Im not sure how you’d do it from within your game
though… sorry

I don’t know why people seem to believe there’s no way to set the OpenGL
refresh rate from an application in Windows. There is, and it’s not
even obscure; it’s a trivial and documented parameter change to
ChangeDisplaySettings.

Part of my reasoning behind it being difficult was the fact that no major
game (e.g. Battlefield 1942, Half-Life) seems to be able/willing to remove
the cap. Still, I shouldn’t assume commerical programmers know everything
eh! That patch sounds like it could be quite useful.

Neil.

There is a openGL extension to set/disable Vsync.

http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt

It won’t allow you to set the refresh rate, but at least you can disable it.> ----- Original Message -----

From: Glenn Maynard [mailto:g_sdl@zewt.org]
Sent: Tuesday, 30 September 2003 8:34
To: sdl at libsdl.org
Subject: Re: [SDL] refresh rate

On Mon, Sep 29, 2003 at 10:47:07PM +0100, Neil Brown wrote:

I know, I know, SDL is not responsible for this but only Windows

No, SDL is 90% responsible for this.

(The other 10% is that Windows doesn’t reliably tell you what the maximum
refresh rate is, so you can’t simply tell Windows to use the maximum
available–on some broken systems, that’ll result in a desynced monitor.)

IIRC it is locked in somewhere in the settings for your graphics card,
and
surprisingly difficult to stop the frame rate (flip rate) being capped at
60hz regardless of your actual refresh rate. A friend had an app for
removing the cap, Im not sure how you’d do it from within your game
though… sorry

I don’t know why people seem to believe there’s no way to set the OpenGL
refresh rate from an application in Windows. There is, and it’s not even
obscure; it’s a trivial and documented parameter change to
ChangeDisplaySettings.

I do have a patch for this; I meant to send it several months ago but I’ve
been busy. I’ll try to clean it up and post it soon; I’d love to get rid of
one more of my app-local SDL hacks. (This patch isn’t ideal, since I havn’t
found logic to find sane default refresh rates over 60hz that won’t break on
poorly-configured systems, but it at least gives applications the option.)


Glenn Maynard


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

You can’t “disable” the refresh rate. This only makes the display not
lock to vsync, which is a completely different issue.

60Hz (on a CRT, at least) looks horrible; 60Hz without vsync looks even
worse.

The issue here is getting a display that doesn’t induce headaches, which
this extension doesn’t help with. :)On Tue, Sep 30, 2003 at 12:24:56PM +1000, Berry, David wrote:

There is a openGL extension to set/disable Vsync.

http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt

It won’t allow you to set the refresh rate, but at least you can disable it.


Glenn Maynard

I ask this question again and again, so maybe I become tedious.
What we can do with refresh rate in Windows?
I know, I know, SDL is not responsible for this but only Windows
IIRC it is locked in somewhere in the settings for your graphics card, and surprisingly
difficult to stop the frame rate (flip rate) being capped at 60hz regardless of your actual
refresh rate. A friend had an app for removing the cap, Im not sure how you’d do it from
within your game though… sorry

no, no! you don’t understand. I mean how can I change the monitor refresh rate to the best monitor refresh rate
because when I go my program to fullscreen the MONITOR refresh rate is 60Hz and my monitor in 800x600 takes 100Hz

sorry for this misconception…

I don’t know why people seem to believe there’s no way to set the OpenGL
refresh rate from an application in Windows. There is, and it’s not
even obscure; it’s a trivial and documented parameter change to
ChangeDisplaySettings.

This is a Windows specific solution and I know it.
If I use it , why we use SDL?
Personally I use SDL because it is cross-platfrom

A quick google search for -windows opengl refresh rate- showed a long
list of sites where you can go to protest this problem. You are an MS
customer, you have a right to have the product you paid for work
properly. In this case it looks like MS is deliberately taking steps to
make sure that OpenGL programs don’t work as well as DirectX programs.
That kind of behavior is illegal in most countries.

You should:

  1. file a bug report with MS and ask for a patch or your money back
  2. contact the appropriate government agency and file a complaint.

The point is that you should bother the people who can fix the problem,
MS and law enforcement, and stop bothering the rest of us victims.

I ask this: WHY IN THE MS WINDOWS SDL HAS ONLY 60HZ MONITOR REFRESH RATE IN FULLSCREEN AND DON’T TAKE THE BEST MONITOR REFRESH RATE
AVAILABLE???

well if you find a windows solution, and you find a linux solution and you
find a solution for all the other platforms you want to support, you
could…

A) make some patches and propose to make it part of SDL

B) wrap the solutions in #ifdef’s so that when you compile your program, it
chooses the right solution

C) increase your knowledge!> ----- Original Message -----

From: cham_gss@hotmail.com (Chameleon)
To:
Sent: Tuesday, September 30, 2003 10:07 AM
Subject: Re: [SDL] refresh rate

I don’t know why people seem to believe there’s no way to set the
OpenGL

refresh rate from an application in Windows. There is, and it’s not
even obscure; it’s a trivial and documented parameter change to
ChangeDisplaySettings.

This is a Windows specific solution and I know it.
If I use it , why we use SDL?
Personally I use SDL because it is cross-platfrom


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

You can’t “disable” the refresh rate. This only makes the display not
lock to vsync, which is a completely different issue.

60Hz (on a CRT, at least) looks horrible; 60Hz without vsync looks even
worse.

The issue here is getting a display that doesn’t induce headaches, which
this extension doesn’t help with. :slight_smile:

The only thing I want is my Monitor Refresh Rate be greater than 60Hz
and in the ideal case, be the best available

I know, I know, SDL is not responsible for this but only Windows

No, SDL is 90% responsible for this.

(The other 10% is that Windows doesn’t reliably tell you what the
maximum refresh rate is, so you can’t simply tell Windows to use
the maximum available–on some broken systems, that’ll result in
a desynced monitor.)

Well! You answer correct. I know it but now I ask:

Can we do something for this?

As you say we cannot blind increase the refresh rate

If I remember correct, Windows return a refresh rate list with all refresh rates in a specific resolution.
Can we do something with this? (I mean a SDL patch)

So, any other ideas?

Thanks

IIRC it is locked in somewhere in the settings for your graphics card,
and surprisingly
difficult to stop the frame rate (flip rate) being capped at 60hz
regardless of your actual
refresh rate. A friend had an app for removing the cap, Im not sure how
you’d do it from
within your game though… sorry
no, no! you don’t understand. I mean how can I change the monitor refresh
rate to the best monitor refresh rate
because when I go my program to fullscreen the MONITOR refresh rate is
60Hz and my monitor in 800x600 takes 100Hz

I understood what you meant even if I used graphics card and monitor in the
wrong places :wink: AFAIK, it is something in the graphics settings that caps
the max frame rate used on your monitor (and hence your graphics
card). Glenn Maynard suggested a fix:

"I don’t know why people seem to believe there’s no way to set the OpenGL
refresh rate from an application in Windows. There is, and it’s not
even obscure; it’s a trivial and documented parameter change to
ChangeDisplaySettings. "

Which looking at my copy of MSDN seems to be the right sort of area, so you
might want to give that a go and see if it helps.

HTH,

Neil.

Here’s some info from MSDN.

LONG ChangeDisplaySettings(
LPDEVMODE lpDevMode,
DWORD dwflags
);

lpDevMode is a struct that contains a member “dmDisplayFrequency”, which can be set to the desired “Mode frequency”. I’m not sure if that’s the same as refresh rate, because I can’t find anything else in MSDN about that parameter.

Anyway, if you want CDS to change mode frequency along with the other settings you have specified, you need to && DM_DISPLAYFREQUENCY with the dwflags that you already have.

Hope this helps!

-Justin
(sorry about the bottom quoting, we have Groupwise for email here…)

g_sdl at zewt.org 09/29/03 06:34PM >>>
I don’t know why people seem to believe there’s no way to set the OpenGL
refresh rate from an application in Windows. There is, and it’s not
even obscure; it’s a trivial and documented parameter change to
ChangeDisplaySettings._______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

A quick google search for -windows opengl refresh rate- showed a long
list of sites where you can go to protest this problem. You are an MS
customer, you have a right to have the product you paid for work
properly. In this case it looks like MS is deliberately taking steps to
make sure that OpenGL programs don’t work as well as DirectX programs.
That kind of behavior is illegal in most countries.

You should:

  1. file a bug report with MS and ask for a patch or your money back
  2. contact the appropriate government agency and file a complaint.

The point is that you should bother the people who can fix the problem,
MS and law enforcement, and stop bothering the rest of us victims.

I ask this: WHY IN THE MS WINDOWS SDL HAS ONLY 60HZ MONITOR REFRESH RATE IN FULLSCREEN AND DON’T TAKE THE BEST MONITOR REFRESH RATE
AVAILABLE???

Do a search on google and read the answer. It will take you 30 seconds.

	Bob PendletonOn Tue, 2003-09-30 at 12:10, <- Chameleon -> wrote:

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

±----------------------------------+

I don’t know why people seem to believe there’s no way to set
the OpenGL refresh rate from an application in Windows. There
is, and it’s not even obscure; it’s a trivial and documented
parameter change to ChangeDisplaySettings.

This is a Windows specific solution and I know it.
If I use it , why we use SDL?

For all the other stuff it makes nice and portable…? SDL is use in
plenty of applications that do various things in platform specific
ways.

Kodo Deluxe (of course! As if I’d ever miss a chance to mention it!
:wink: is one of them - and it still runs on some 20 different OS/CPU
combinations. No big deal - just a few #ifdefs, and some weird
features that no one will miss, that work only on Linux. (Especially
true if some of the platform specific code is contributed by others,
so you don’t have to hack it yourself! :wink:

Personally I use SDL because it is cross-platfrom

Sure, and I think the majority of us do. However, I don’t see what’s
wrong with giving some users some bonus features - especially if it’s
stuff that could later be implemented on some other platforms as
well. Platforms are not identical. Some just don’t provide certain
features at all. Does that mean you shouldn’t use those features at
all, on any platform…?

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Tuesday 30 September 2003 19.07, wrote:

Before I go running off re-inventing the wheel (my version would undoubtedly
look remarkably like a square), I wanted to see if any of you have already
developed solutions for them:

  1. I need to be able to read a source Rect from a bmp and rotate it 90
    degrees.
  2. Copy one SDL_Surface to another.
  3. take a Rect and apply different levels of alpha, i.e., make one color
    fully transparent and then apply a % to the remainder of the image.

I can go about these using brute force techniques but wanted to see if
anyone out there had a more graceful solution.
Thanks,
Jason