Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: vpin on October 09, 2009, 10:18:38 AM

Title: FPS in FullScreen
Post by: vpin on October 09, 2009, 10:18:38 AM
At the game start in full screen mode, I observe a fixed fps - the game is retarding much,
even the cursor movement occurs with a noticeable lag.
In case we establish the flag Use Direct3D  and disable the vertical sync (vsync) in the video settings,
everything is fine!

Has anyone solved the problem  how to disable the vertical sync,
without changing of the video card's options?
Title: Re: FPS in FullScreen
Post by: odnorf on October 09, 2009, 11:16:56 AM
WME doesn't set vsync on/off. It should be possible if anyone is willing to contribute the sources for that (note that not even that will work 100% of the times since you can force vsync on in some gpu drivers).
Title: Re: FPS in FullScreen
Post by: vpin on October 09, 2009, 02:04:17 PM
I've researched this problem a little.
Before initializing D3DDevice, you must assign the fields structure D3DPRESENT_PARAMETERS following values
g_d3d9Parameters.SwapEffect             = D3DSWAPEFFECT_COPY;
g_d3d9Parameters.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
This disables vertical sync in DirectX 9

http://www.devmaster.net/forums/showthread.php?t=5577
Title: Re: FPS in FullScreen
Post by: Spellbreaker on October 09, 2009, 08:11:48 PM
Disabling VSync yourself is not a good Idea, because it's for a good reason. That simply means most people with TFT Screens want VSync to avoid flickering.

With 60FPS (60Hz) or 100FPS ( 100Hz ) your game should run perfectly smooth.
Title: Re: FPS in FullScreen
Post by: vpin on October 12, 2009, 07:51:54 AM
And what if to turn off the vertical synchronization only in fullScreen mode
for all the operating time of the game and by the switched on  Direct3D?
It would be wonderful, if the similar settings appeared in WME.
Title: Re: FPS in FullScreen
Post by: Spellbreaker on October 12, 2009, 01:08:14 PM
Why don't you let the user decide that, using the GPU Settings? If you turn it off yourself, most TFT users today will complain about your flickering Game...
Title: Re: FPS in FullScreen
Post by: vpin on October 13, 2009, 08:10:51 AM
Ok. Forget about the synchronization.
But the problem still remains.
Screen - 1024x768 resolution, fullScreen, cycle game_loop.script disabled (for testing) - cursor movement slowed.
What is possible to do here?