refresh rate setting

BlitzMax Forums/BlitzMax Beginners Area/refresh rate setting

yossi(Posted 2014) [#1]
it seems to me that the refresh rate setting (the fourth parameter at the graphics command) work fine on windword mode (the 3 parameter on the graphics command=0) but doesn't work well on full screen mode (the 3 parameter of the graphics command=32).

when I check the refresh rate on full screen mode I always get 60 fps regardless the value of the refresh rate parameter on the graphics command.

on windword mode the value of the refresh rate I get is equal to the parameter of the graphics command.

does it the normal behavior of blitz max or do I have a problem in my computer ?


GfK(Posted 2014) [#2]
All the Hertz parameter does (which incidentally, only works in fullscreen mode as far as I'm aware), is set the refresh rate of the monitor/display. It doesn't force your game to run at 60FPS, if that's what you're thinking it does. You'll need to implement some timing code for that. There are plenty of examples of various methods in the code archives.


Jesse(Posted 2014) [#3]
Function Flip( sync=-1 )



Description Flip current graphics object
Information Flip swap the front and back buffers of the current graphics objects.
If sync is 0, then the flip occurs as soon as possible. If sync is 1, then the flip occurs on the next vertical blank.

If sync is -1 and the current graphics object was created with the Graphics command, then flips will occur at the graphics object's refresh rate, unless the graphics object was created with a refresh rate of 0 in which case flip occurs immediately.

If sync is -1 and the current graphics object was NOT created with the Graphics command, then the flip will occur on the next vertical blank.





yossi(Posted 2014) [#4]
when I run the 'Refreshrate and Delta Time' example from the 'Beginners guide to BlitzMax' by wave from the tutorials section of the site I get on screen always 60 fps regardless the values of the const RefreshRate in the code.

when I change the code to windowed I get that the value of the const RefreshRate in code is equal to the value that is displayed on the screen
(i understand that this is the normal behavior but in full screen mode i don't get this behavior).

from this code example it seems to me that the hertz parameter of the graphics command has no influence on screen full mode on my computer (on full screen mode i always get 60 fps).

i don't know if it is connected but my OS is WINDOWS 8.1.


GfK(Posted 2014) [#5]
It won't make any difference if the Hertz parameter is trying to set a refresh rate that your monitor doesn't support. It will stay at 60 (which is the norm for most laptops/LCD screens).


yossi(Posted 2014) [#6]
I know that but what I cant understand is why it works on windword mode but doesn't work on full screen mode.

why the behavior on windword is different from the behavior on full screen mode ?

does this behavior is the normal or I have specific problem on my computer ?