Default Hertz

BlitzMax Forums/BlitzMax Beginners Area/Default Hertz

Shambler(Posted 2005) [#1]
When you specify Graphics 800,600,32 Blitz selects a default hertz of 60, on my machine at least.

My monitor normally runs at 100Hz and I would like to keep it there.

Is there any way for Blitz to leave the refresh rate alone?

I see that GetGraphics does not return any useful information until the mode has already been set, so I can't use that to test the hertz.


tonyg(Posted 2005) [#2]
Set the value to 0 rather than leave to default.


Shambler(Posted 2005) [#3]
The problem is that 0 uses the default of 60Hz too.


tonyg(Posted 2005) [#4]
It shouldn't.
Leaving off the hertz is the same as specifying 60
Adding 0 is supposed to take the default hertz for that particular resolution on your machine.
This might help...

skunk wrote:
Ideally choosing a refresh rate of zero will pick the host os desired refresh rate for that resolution, -not- 60.

If I wanted 60, I'd put 60 in the box, wouldn't I?




Earlier, skidracer wrote:
skunk, the docs need updating, if you set the hz value in Graphics to 0 (it defaults to 60) windows WILL pick the default refresh rate for that resolution.



Graphics 640,480,32 is the same as Graphics 640,480,32,60 which is not the same as Graphics 640,480,32,0



Sybixsus wrote:
It's still decidedly unclear to me exactly how to do this properly, as it's also unclear exactly what the hz setting is doing. Is it setting the monitor hertz? Is it setting up BMax internal timing? Is it doing both? From the comments I've seen from BRL and users, it appears to be doing both.





Earlier, marksibly wrote:
It tries to use vsync if possible. If not, it disables vsync and uses an internal timing system. This makes for much smoother graphics than if the vsync is left enabled and 'fighting' the update rate. It also provides surprisingly flicker-free results for systems with no vsync.

See mod/brl.mod/glmax2d.mod/glmax2d.bmx for how it all works.



This only applies to the Graphics/Flip mechanism. If you want to avoid the timing mechanism, use bglSwapBuffers instead of Flip.


taken from Proper Game Timing


Robert Cummings(Posted 2005) [#5]
It picks 60 here too, and my default is 75.


tonyg(Posted 2005) [#6]
Hmm, using DX driver picks my monitor default (70) when I specify 640,480,32,0
How are you checking?
Graphics 640,480,32,0
While Not KeyHit(key_escape)
  Cls
  DrawText "Hello World!",0,0
  DrawText "What is the FPS cap?",0,10
	curTime = MilliSecs()
	If curTime > checkTime Then
		checkTime = curTime + 1000
		curFPS = fpscounter
		fpscounter = 0
	Else
		fpscounter = fpscounter + 1
	End If
	DrawText curFPS,0,20
  Flip
Wend 

The curFPS refects whetever I specify in the Monitor Refresh Frequency field of my Monitor settings panel.
Using GL graphicsdriver returns odd results and seems to ignore the cap.


Shambler(Posted 2005) [#7]
Using the OpenGL driver here and checking by pressing the monitor menu button which shows the screen refresh rate.

[EDIT] The question is, where is the default setting for each resolution stored?


tonyg(Posted 2005) [#8]
Try DX driver.
CGV seems to mention the same problem here
There really needs to be a definitive answer (tutorial?) on timing and refresh rates as there's lots of posts with conflicting information.
The hertz field only affects FPS not the monitor, hertz field can cause black screen if set too high for the monitor, hertz only affects flip and not game logic etc etc.
<edit> P.S. Thought I found a way to list the defaults the other night but can't do it again now so must have been mistaken. Yet another thread has stated that Bmax takes the highesh possible rate for your specified res but I don't find this to be the case.


Shambler(Posted 2005) [#9]
Same with DX driver, the more I read on this the more confused I become ^^

If I specify a hertz then my monitor switches to that frequency or near.

So if I ask for, I get

60 -> 60
100 -> 100
110 -> 100
120 -> 120
130 -> 100 'strange why not 120?


tonyg(Posted 2005) [#10]
I agree it's confusing which is why we need that official 'tutorial' from BRL.


smilertoo(Posted 2005) [#11]
A lot of drivers have presets they jump too when you go fullscreen, but they should let you alter them.


Robert Cummings(Posted 2005) [#12]
I think it's pretty buggy.

Blitz3D's one for what it's worth, gets it right...


Hotcakes(Posted 2005) [#13]
Blitz3D doesn't have a hertz parameter.

BlitzMax... I know exactly what it's supposed to do and one can only assume that it's trying to do it, but whatever it is it doesn't seem to be working for many people =] I'm under the sneaky suspicion that things may have ... changed... unintentionally when the DX module came in... maybe...