PDA

View Full Version : Hz and Resolution



DarkShadow44
10-16-2009, 01:07 PM
Hi, how can I change the Hz (the rate of my screen) ?
And could this demage my screen ?

And how can I enable Tripple buffering for better Vsync ?

And what does" HSync" ?

Sorry for my English ^^

DarkShadow44
10-18-2009, 03:38 AM
?

ZbuffeR
10-18-2009, 07:22 AM
Changing display refresh rate is not doable with OpenGL alone, it is OS-dependant.
No it can not damage your screen. Well, maybe a 15 years old CRT monitor maybe be sensitive to bad sync, but nowadays they just switch to sleep mode.
Triple buffering is not doable with OpenGL alone, it is OS-and-hardware-dependant.
Hsync is horizontal sync. Very useful 15 years ago on 8bits and 16bits computers (amiga/atari) to have more than a dozen colors at a time : "just" change the palette during hsync, so each line have its own palette.
Not sure what you could do with such a feature nowadays. And it is not available in OpenGL :)

vivek vyas
10-18-2009, 07:41 AM
yes i read some artical that thus CRT don't have safe guard with them
so they can't stop the some kind of supply
so either they get burned or get damaged
and article is X11 windows system's 6.9 version docs
and i do it for just get Mesa/drivers.

DarkShadow44
10-18-2009, 02:31 PM
So it can't damage a flat-screen-monitor ?
Do you know how to change the refresh rate with WinAPI ??
And tripple buffering ? (isn't that like VSnyc done with OpenGL ?)

ZbuffeR
10-18-2009, 04:06 PM
Even most 10 years old CRTs will not be damaged.
And LCD, by construction, can not be damaged due to too high refresh rate. Worse that will happen : no image on screen.
I use GLFW for cross-platform refresh rate setting.

Ilian Dinev
10-18-2009, 07:08 PM
Modify and use this:


static void SwitchToFullscreen(int width,int height){
int nMode = 0; int Framerate=60;
DEVMODE devMode;
EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &g_oldDevMode );

while( EnumDisplaySettings( NULL, nMode++, &devMode ) ){
if( devMode.dmPelsWidth != width || devMode.dmPelsHeight != height) continue;
if( devMode.dmBitsPerPel != 32 )continue;
if( devMode.dmDisplayFrequency != g_oldDevMode.dmDisplayFrequency)continue;
if( ChangeDisplaySettings( &devMode, CDS_TEST ) == DISP_CHANGE_SUCCESSFUL ){
InFullScreen=true;
break;
}
}
if(!InFullScreen){
MessageBoxA(hMain,"Monitor doesn't support this resolution","error",0);
InFullScreen=false;
return;
}
if(ChangeDisplaySettings( &devMode, CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL ){
InFullScreen=false;
MessageBoxA(hMain,"Cannot set required monitor mode","error",0);
}
}

DarkShadow44
10-19-2009, 10:19 AM
Thanks very much !!
Where did you get this code ?

And
1) How can I check which monitor supports which Resolution + Reresh Rate (and which Resolution which refresh rate)

2) Do LCD screens need VSync ? Or only old screens ?

Ilian Dinev
10-19-2009, 12:25 PM
I composed it, looking at the FullScreen code in any of the NeHe tutorials. (where it nags "Run in Fullscreen?") .


1) look in the code. Windows enumerates all possible combinations for you.

2) Yes, LCDs and all type of screens need vsync. The data is being sent in serial fashion through a cable with several wires. If there was no need for Vsync, then that cable would have several million wires :) .

DarkShadow44
10-20-2009, 09:44 AM
Why is my highest supported refresh rate only 75 ??

And: Do other games also limit the FPS limit with VSync ?

Ilian Dinev
10-20-2009, 10:35 AM
"only 75" ? Most LCDs stick to 60Hz max.
Some games give you the option to enable vsync, by default they keep it off, because when (it's the common case) the game renders at i.e 44fps, enabling vsync will make the app dodge around between 60Hz, 30Hz, 15Hz - which is quite nasty. Users with gaming rigs generally know when to enable or disable vsync.
Ah, all console games do perfect vsync - there the hardware is fixed, and the load is predictable :) .