can i set refresh rate in irrlicht?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Georgian
Posts: 60
Joined: Sat Mar 31, 2007 12:55 pm

can i set refresh rate in irrlicht?

Post 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?
using Visual Studio 2003 , I use 3D Max 7, I love irrlicht its a really good and easy engine
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, that's not possible. But you can avoid vsync at all such that the app runs in full speed.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

AFAIK the refresh rate you mentioned is the rate of the monitor and fully independant from the app's refresh rate...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Georgian
Posts: 60
Joined: Sat Mar 31, 2007 12:55 pm

Post 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!
using Visual Studio 2003 , I use 3D Max 7, I love irrlicht its a really good and easy engine
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Georgian
Posts: 60
Joined: Sat Mar 31, 2007 12:55 pm

Post 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:
using Visual Studio 2003 , I use 3D Max 7, I love irrlicht its a really good and easy engine
Georgian
Posts: 60
Joined: Sat Mar 31, 2007 12:55 pm

Post 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 :)
using Visual Studio 2003 , I use 3D Max 7, I love irrlicht its a really good and easy engine
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Post Reply