[MDX] How do I get more than 60 fps?
I've written a simple managed d3d game and a simple FPS counter.
Every time the Render function is executed, I add _one_ to the FPS counter, and then output the frame count per second.
Problem is, I can never get higher than 60fps, which seems to be the result (I'm guessing) of v-sync or something similar. Is there some property I have to turn on/off to get more than 60fps? Am I measuring FPS incorrectly?
To give a bit more context, my Render function is called in the game loop, it's not timer based, it should just run as fast as the machine.
Here are the device properties I am setting:
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
presentParams.EnableAutoDepthStencil = true;
presentParams.AutoDepthStencilFormat = DepthFormat.D16;
device.RenderState.ZBufferEnable = true;
device.RenderState.Lighting = true;
If anyone has any ideas, I'd greatly appreciate them!
Thanks!
Set presentParams.PresentationInterval to Immediate. This will disable V-Sync.
If this doesn't help - your video card drivers might be overriding this setting, make sure they are set to not override the setting.
[edit] ownt.
If this doesn't help - your video card drivers might be overriding this setting, make sure they are set to not override the setting.
[edit] ownt.
Quote:Original post by ferventThis is indeed the most likely reason you're clamped to 60hz.
I can never get higher than 60fps, which seems to be the result (I'm guessing) of v-sync or something similar.
Quote:Original post by ferventYou can set the presentation interval to "immediate" - but it is only a hint to the driver, and it is free to completely ignore it if it wants.
Is there some property I have to turn on/off to get more than 60fps?
I'm not an MDX programmer, but at a guess:
presentParams.PresentationInterval = Immediate;
Or something similar [smile]
Check out your driver's control panel - most Nvidia/ATI (presumably others) have a "Application Preference" setting or an override ("always on", "always off"). Thus its not a good idea to assume that your end-user will (or won't) be using VSYNC.
hth
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement