Vsync doesn´t work with DIRECT3D9

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
Dibalo
Posts: 30
Joined: Sat Aug 12, 2006 2:31 pm
Location: Finland
Contact:

Vsync doesn´t work with DIRECT3D9

Post by Dibalo »

So here is my problem: if I try to enable vsync using DIRECT3D9-device, it doesn´t work.

Can anyone tell me, what I have to do to enable that vsync?
Dattebayo!!
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The vsync option only worked in full screen mode. This was fixed by hybrid in SVN change 184. If you use Irrlicht SVN, it should work, and if you don't, you can apply the same fix to your version pretty easily.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Oh wow, I did not know that this really changed something :oops: But this sounds really useful 8)
Dibalo
Posts: 30
Joined: Sat Aug 12, 2006 2:31 pm
Location: Finland
Contact:

Post by Dibalo »

It works now. Thanks mates! :)
Dattebayo!!
pwierz
Posts: 59
Joined: Sun Aug 20, 2006 3:32 pm

Post by pwierz »

So if vsync is working, the frame rate should be locked in to the refresh rate, right? Here's what I have:

irr::SIrrlichtCreationParameters param;
param.WindowId = reinterpret_cast<s32>(g_hMainWnd);
param.DriverType = video::EDT_DIRECT3D9 ;
param.EventReceiver = receiver;
param.Fullscreen = true;
param.Bits = 32;
param.Vsync = true;

device = irr::createDeviceEx(param);
And it still doesn't seem to work. Any help?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

What is the refresh rate you can see? As said elsewhere there is no chance to get Irrlicht render faster by setting Vsync. So if the FPS are lower than your refresh rate this is ok. Only if it's faster then your refresh rate it might be a problem. In case check your driver settings (in display->properties->extended of the MS control) and see if you force the driver to disable vsync globally.
Post Reply