[MDX] How do I get more than 60 fps?

Started by
3 comments, last by fervent 17 years, 11 months ago
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!
Advertisement
presentParams.PresentationInterval = PresentInterval.Immediate; [smile]

Regards,
ViLiO
Richard 'ViLiO' Thomasv.net | Twitter | YouTube
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.
Sirob Yes.» - status: Work-O-Rama.
Quote:Original post by fervent
I can never get higher than 60fps, which seems to be the result (I'm guessing) of v-sync or something similar.
This is indeed the most likely reason you're clamped to 60hz.

Quote:Original post by fervent
Is there some property I have to turn on/off to get more than 60fps?
You 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.

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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Awesome, thanks guy!

That did just the trick. :)

This topic is closed to new replies.

Advertisement