Page 1 of 1

can i set refresh rate in irrlicht?

Posted: Thu Aug 02, 2007 10:14 am
by Georgian
hi,
is it possible to set Screen Refresh Rate in irrlicht?
:?

it is a very important thing in games I hated GTA for that no way to set Display Freq and on 19' monitor 60hz thats bad really bad. why settle for 60 when 120 is much much better?
I know i can force 120Hz from Catalyst Control Panel buy why not be able to choose?

Posted: Thu Aug 02, 2007 11:52 am
by hybrid
No, that's not possible. But you can avoid vsync at all such that the app runs in full speed.

Posted: Thu Aug 02, 2007 12:44 pm
by Acki
AFAIK the refresh rate you mentioned is the rate of the monitor and fully independant from the app's refresh rate...

Posted: Thu Aug 02, 2007 1:35 pm
by Georgian
so its not app dependent huh?

well my monitor has info and in there Refresh Rate is written
if u make 2 changes in CIRRDEVICEWIN32.h

Code: Select all

	DEVMODE dm;
	memset(&dm, 0, sizeof(dm));
	dm.dmSize = sizeof(dm);
	dm.dmPelsWidth = width;
	dm.dmPelsHeight	= height;
	dm.dmBitsPerPel	= bits;
	dm.dmDisplayFrequency=60;
	dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
the frequency is changed.
if dm.dmDisplayFrequency=100; the screen is stable and easy to watch if not it flickers!

Posted: Thu Aug 02, 2007 2:30 pm
by Acki
well, of course it's possible to change the monitor rate by a programm (like with the progs from the system), also I didn't know that Irrlicht has this implemented too, even if you have to change the source code itself...
what I meant (and probably hybrid, too) was that this setting has no effect on the app itself, the refresh rate (fps) of the app will still be the same... ;)

Posted: Thu Aug 02, 2007 2:35 pm
by hybrid
The curretn setting uses "the hardware's default refresh rate" which has to be sane to give good results. It's basically a question of your gfx driver. But I'll add a version which tries with the desktop rate first and only as a fallback uses the default rate.

Posted: Thu Aug 02, 2007 2:35 pm
by Georgian
Acki
not really,
if one has VSync on and Refresh Rate is set To 100hz FPS will be under 100
if 60Hz Fps under 60.
i think there will be no more differences except the eyes will rest.
60hz is bad for eyes!

:wink:

Posted: Thu Aug 02, 2007 2:43 pm
by Georgian
hybrid
I think thats not a good idea
because refresh rates change with resolution
if its possibe to get Max Refresh rate for chosen resolution that would be better
for example
on 1024x768 mode my monitor supports 120hz
on 1280x1024 it supports only 85hz

if desktop is 1024x768 and in irrlicht i created 1280x1024 100hz will fail and 60hz (hardware default) will be set


also if desktop resolution is 1280x1024 you will try to set 85hz
but if in fullscreen mode i want 1024x768 you wont get max refresh rate :)

Posted: Thu Aug 02, 2007 4:25 pm
by hybrid
Since we don't save the refresh rate, yet, there is no other way. But we don't try to figure out a proper fullscreen mode anyway (I guess that 456x123 wouldn't be supported on most machines, so it would also fail). And now we will be a little better than before, but not break any working version.