Good afternoon,
I'm working on a simple MDX sample to show how to code your own MDX app from ground up using a default Windows Form project. After stuggling for some time with inexplicably low framerates, I changed a bunch of parameters to see where the issue was coming from.
It turned out that I hadn't set the PresentationInterval in the PresentParameters for creating my device, which gave me a framerate of ~40 fps for just rendering a simple mesh. I assumed this ommission would work out, since the docs say that:
Quote:For a windowed swap chain, this value must be PresentInterval.Default (0).
When I use this
PresentInterval.Default value for this property though, the framerate does not improve at all. Setting this value to
PresentInterval.Immediate however gives me a framerate of 4400+ fps. How about that? To be sure, I checked the C++ docs and these tell something completely different, but offers no recommendation:
Quote:Windowed mode supports D3DPRESENT_INTERVAL_DEFAULT, D3DPRESENT_INTERVAL_IMMEDIATE, and D3DPRESENT_INTERVAL_ONE. D3DPRESENT_INTERVAL_DEFAULT and the D3DPRESENT_INTERVAL_ONE are nearly equivalent (see the information regarding timer resolution below). They perform similarly to COPY_VSYNC in that there is only one present per frame, and they prevent tearing with beam-following. In contrast, D3DPRESENT_INTERVAL_IMMEDIATE will attempt to provide an unlimited presentation rate.
So, I have two questions:
1) Should I just use PresentInterval.Immediate, the managed docs be damned?
2) I don't understand why the framerate is so terribly low when using
PresentInterval.Default. I understand it's trying to match the monitor's refresh rate, but that's obviously 60Hz rather than 40Hz. Plus, some occasional slowdowns to ~10 fps when using this value seems to hint at another problem.
I've been having various issues with my GeForce 7800GTX on previous occasions, so I was wondering if this issue might have something to do with that infernal card again. It almost seems like it only works properly in fullscreen. This problem doesn't show when I run the sample in fullscreen, no matter what value I use for the PresentationInterval.
Checking back to my dreaded instancing sample, I also found that this one runs perfectly in fullscreen (~69 fps) while it can only render the exact same scene at ~2 fps in Windowed mode. It's built on the MDX SampleFramework, so any issues with PresentParameters should be gracefully handled...
Has anyone experienced similar issues with a 7800GTX or have I just gotten myself a buggy card here? I must have tried just about all drivers by now and I also tried contacting NVidia about this through the registered partners site, but I haven't heard from them yet [headshake]
Thanks for reading this rather huge question and for any feedback you can provide.