Hz and Resolution

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 ^^


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 :slight_smile:

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.

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 ?)

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.

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 ){
		MessageBoxA(hMain,"Monitor doesn't support this resolution","error",0);
	if(ChangeDisplaySettings( &devMode, CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL ){
		MessageBoxA(hMain,"Cannot set required monitor mode","error",0);

Thanks very much !!
Where did you get this code ?


  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 ?

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 :slight_smile: .

Why is my highest supported refresh rate only 75 ??

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

“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 :slight_smile: .