Please explain the extended parameters of graphics

BlitzMax Forums/BlitzMax Beginners Area/Please explain the extended parameters of graphics

Robert Cummings(Posted 2005) [#1]
Dear community,

I don't really understand the very brief documentation of Graphics()

What is hardsync? what is softsync? what goes on under the hood? is the monitor refresh rate actually ever changed?

What happens if I specify -1|HARDSYNC? will this change the monitor's refresh rate from 60hz?

I get a headache from crt monitors at 60hz really quickly.


Dreamora(Posted 2005) [#2]
It does not change the refresh rate at all (at least not on my system ... on the other side it is not even capable to accept anything beside -1 which simply disables the vertical sync)


Robert Cummings(Posted 2005) [#3]
So it's very buggy? do you have CRT or LCD?

One of the -BEST- things about Blitz3D was that it always chose the highest and best refresh rate for my monitor (closest to desktop settings as possible)

Can I do this in Blitzmax?


Dreamora(Posted 2005) [#4]
I've a TFT (part of my notebook)
Don't know if it is possible as I never tested it as I only have fixed 60hz


FlameDuck(Posted 2005) [#5]
What is hardsync?
Hardsync means that that display update timing (when fipping/swapping back and front buffers) are handled by the hardware (graphics card) driver. On some systems however (because drivers are kernel programs) this is a BUSY wait, that is the CPU cannot do anything else in the mean time.

what is softsync?
SoftSync means that display flipping is controlled by a software timer. This means that the program instead IDLE waits (that is, the CPU can execute other programs until the timer fires). Unfortunately it means that the display "swap" doesn't take place on the electon beams vertical sync trigger (when the electron beam moves from the bottom of the display to the top of the display), but instead you can use it (not recomended tho') as a mostly reliable game timer, without adding additional logic.

is the monitor refresh rate actually ever changed?

Yes. A hardsync will (should ?) change the refreshrate (it does here).

What happens if I specify -1|HARDSYNC? will this change the monitor's refresh rate from 60hz?
No. Mine is in 75Hz (the default) vertical refresh rate.


Robert Cummings(Posted 2005) [#6]
Many thanks Mikkel.

Is there any reason why you're not a paid up member of the staff because the clarity of your explanation is brilliant. Would you be kind enough to gather together all your brilliant tips and put them in the Wiki? Perhaps if we all paid you eh? :)


FlameDuck(Posted 2005) [#7]
Is there any reason why you're not a paid up member of the staff because the clarity of your explanation is brilliant.
Because I'm happy to do it for free I reckon.

Would you be kind enough to gather together all your brilliant tips and put them in the Wiki?
I suppose I could, but it's hard for me to gauge which tips are wiki material, and which aren't.

However people should feel free to submit anything I've said on here to whichever backup source they find convenient.

Perhaps if we all paid you eh? :)
Nah, I already got a job (well studying, but I have a job lined up when I'm done), and I doubt BRL, or the community for that matter, could pay as well, even if they wanted to.